HTTP post - SocketError

I can’t figure this one out! Here is my code:

def test_post
query = { :formid => “5”, :type => “CustomFormWeb”, :Contact0Email =>
[email protected]”, :Contact0FirstName => “Testertilla”, :Contact0LastName
=> “Test”, :Conctact0PostalCode => “85201” }

url = URI.parse(‘https://endorsed.infusionsoft.com’)
res = Net::HTTP.start(url.host, url.port) do |http|
http.post_form(url, query)
end

render :text => “Success!”
end

I’m getting this error:

SocketError (getaddrinfo: nodename nor servname provided, or not known):

I’m running on OSX 10.5.4.

It’s basically posting to an application that usually expects a form
post. I’ve also tried the post_form method with the same results.

Please help!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs