Ruby https post


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:

`sysread’: end of file reached (EOFError)

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

Thanks in advance.

Check mechanize at . Read the
“Filling forms” section.