Ruby Equivalent of Python Requests Library (HTTP Client)

Posted by Hartator on Stack Overflow See other posts from Stack Overflow or by Hartator
Published on 2012-10-30T04:15:02Z Indexed on 2012/10/30 5:01 UTC
Read the original article Hit count: 304

Filed under:
|
|
|
|

There is a library in python that I love called requests. requests is a http client build on urllib3, top-notch :) (http://docs.python-requests.org/en/latest/)

I am looking for something similar in ruby, basically what I need is :

  • Upload files support (multipart/form-data)
  • Easy get/post
  • Cookies can be passed from a response object to a request object (build manually login script)
  • Stable and Flexible
  • Sessions support (to not have to handle cookies manually if we don't have too)

I've looked at Typhoeus, but the code example in the home page doesn't work (they have moved code along and the get method is not longer directly accessible like that), so it's not starting well! :) Curb seems nice and I like curl, there is alson RestClient which seems popular and em-http seems pretty fast according to benchmark. There is a aso Patron and CurlFu which I haven't have the time to try. And of course Net:Http. But it doesn't seems to have a main stream solution that everyone point.

I think a lot of people have been in my situation and I wonder what they have choosen and why?

© Stack Overflow or respective owner

Related posts about ruby

Related posts about http