From: Ricky Winowiecki Date: 2009-07-20T17:01:22+09:00 Subject: Re: Installing Curb Was: Re: ruby libcurl maintainer? Md.elme focruzzaman Shuvo wrote: > Ricky Winowiecki wrote: >> I'm having this problem, was there ever a resolution to this? > > I think curb is not built for windows. Once upon a time i was trying to > install that on my windows pc but that did not make any sense. So, I > leave it and go back to the net/http lib . it is a built in library of > ruby. So if you can write a http request/response class using it than > your code will compilable with any latest ruby built. The major > advantage of using net/http is that you do not need to install any 3rd > party library. Another fantastic tools for doing scraping with ruby is > machanize. You can use this too. > > Regards, > Shuvo. Perhaps you could help with a net/http problem. I am trying to communicate with a server by sending the following post POST /LabelService/EwsLabelService.asmx/GetPostageLabelXML HTTP/1.1 Host: www.envmgr.com Content-Type: application/x-www-form-urlencoded Content-Length: length labelRequestXML= ... I hadn't been able to get it to work with net/http's post_form or post functions. I would always end up with a timeout or the server unexpectedly terminating my connection. I asked for an example in ruby and they gave me the following require "curl" xml_request = "" URL = "https://www.envmgr.com/LabelService/EwsLabelService.asmx/GetPostageLabelXML" c = Curl::Easy.http_post(URL, Curl::PostField.content('labelRequestXML', xml_request)) c.follow_location = true c.ssl_verify_host = false puts c.body_str Any ideas how I could accomplish this in net/http? -- Posted via http://www.ruby-forum.com/.