Skip to content

Instantly share code, notes, and snippets.

@mattfawcett
Created December 3, 2009 22:19
Show Gist options
  • Save mattfawcett/248598 to your computer and use it in GitHub Desktop.
Save mattfawcett/248598 to your computer and use it in GitHub Desktop.
require 'net/http'
require 'net/https'
url = URI.parse('https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/1234567890')
req = Net::HTTP::Post.new(url.path)
req.set_form_data({'my'=>'params'})
res = Net::HTTP.new(url.host, url.port)
res.use_ssl = true
#send the response to stderr for debugging
res.set_debug_output $stderr
res.start {|http| http.request(req) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment