Guest User

Untitled

a guest
Jan 21st, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. require 'rubygems'
  2. require 'vcr'
  3. require 'net/http'
  4.  
  5. VCR.configure do |c|
  6. c.cassette_library_dir = 'cassettes'
  7. c.stub_with :webmock
  8. c.default_cassette_options = { :record => :once }
  9. end
  10.  
  11. host = "encrypted.google.com"
  12.  
  13. http = Net::HTTP.new(host, 443)
  14. http.use_ssl = true
  15. http.verify_mode = OpenSSL::SSL::VERIFY_NONE
  16.  
  17. url = "/search?abc=%2B"
  18.  
  19. VCR.use_cassette("example") do
  20. http.request(Net::HTTP::Post.new(url))
  21. end
  22.  
  23. VCR.use_cassette("example") do
  24. http.request(Net::HTTP::Post.new(url))
  25. end
Add Comment
Please, Sign In to add comment