Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!weretis.net!feeder5.news.weretis.net!talisker.lacave.net!lacave.net!not-for-mail From: "Stuffe L." Newsgroups: comp.lang.ruby Subject: HTTP request, with headers, post data and SSL :( Date: Wed, 13 Apr 2011 14:11:59 -0500 Organization: Service de news de lacave.net Lines: 24 Message-ID: NNTP-Posting-Host: bristol.highgroove.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: talisker.lacave.net 1302723732 21245 65.111.164.187 (13 Apr 2011 19:42:12 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Wed, 13 Apr 2011 19:42:12 +0000 (UTC) X-Received-From: This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway X-Mail-Count: 381454 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:2780 Hello everyone I am new to ruby and have been struggeling with this http api thing. I need to do a request with certian request headers, certain post variables and SSL. I got it to work with SSL and the headers, but I just cant get it to work when i try to cenvert it to post. Very frustrating. Heres how far i got (this is without post, which i couldnt get to work): post_me = 'xml data' headers = {'Header' => 'Whatever'} uri = URI.parse("https://example.com") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE response = http.post(uri.request_uri, get_string, headers) Any help very much apreciated -- Posted via http://www.ruby-forum.com/.