Skip to content

Instantly share code, notes, and snippets.

@alaingoldman
Last active January 4, 2016 14:09
Show Gist options
  • Select an option

  • Save alaingoldman/8632322 to your computer and use it in GitHub Desktop.

Select an option

Save alaingoldman/8632322 to your computer and use it in GitHub Desktop.
uri = URI.parse("https://coinbase.com/api/v1/buttons")
button = { :name => 'test', :type => 'buy_now', :description => 'sample description', :include_email => true }
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
response = Net::HTTP.post_form(uri,button)
response
#<Net::HTTPBadRequest 400 Bad Request readbody=true>
The plain HTTP request was sent to HTTPS port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment