HTTPS and HTTParty - Timeout and EOF

Posted by ferparra on Stack Overflow See other posts from Stack Overflow or by ferparra
Published on 2009-07-23T19:56:15Z Indexed on 2010/04/28 17:47 UTC
Read the original article Hit count: 261

Filed under:
|

Hi all,

I'm trying to post something to an HTTPS resource, but it seems it doesn't work.

My code look something like this:

require 'httparty'   
class MyClass
    include HTTParty
    base_uri "https://mydomain.com:8085/search"
    basic_auth 'admin', 'changeme'
    format :xml
    def mymethod
      self.class.post('/job', :query => {:search => "*"})
    end
end

As you can see, I've defined an URI with 'https' included, so it should set the use_ssl property for the Net::HTTPS library automatically. For some reason, Net::HTTP is requested, and I never get in touch with the server, so I end up with an EOF.

Any clues?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about httparty