ruby https post

C

Cristian Prodan

Hello,

I'm trying to make a post request to a server. This is the code I use:

---
require 'net/http'
require 'uri'

res = Net::HTTP.post_form(URI.parse('https://someValidURL'),
{:trans_id => "123456", :amount => "20.00"})

puts res.body
---

I get back this error:

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:133:in
`sysread': end of file reached (EOFError)

I searched the web but didn't find an answer. Can anyone please help ?

Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top