Created
September 20, 2011 09:33
-
-
Save nicholassm/1228738 to your computer and use it in GitHub Desktop.
Demonstration of %2B being unencoded in the cassette in VCR (1.11.3)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'vcr' | |
require 'net/http' | |
VCR.configure do |c| | |
c.cassette_library_dir = 'cassettes' | |
c.stub_with :webmock | |
c.default_cassette_options = { :record => :once } | |
end | |
host = "encrypted.google.com" | |
http = Net::HTTP.new(host, 443) | |
http.use_ssl = true | |
http.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
url = "/search?abc=%2B" | |
VCR.use_cassette("example") do | |
http.request(Net::HTTP::Post.new(url)) | |
end | |
VCR.use_cassette("example") do | |
http.request(Net::HTTP::Post.new(url)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment