Ruby Equivalent of Python Requests Library (HTTP Client)
- by Hartator
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?