Brauchbar is a project mainly written in Ruby, it's free.
adj, German. practical, convenient, utilizable, feasible AKA a decent HTTP client for Ruby
Adj, German. practical, convenient, utilizable, feasible
In other words, a decent HTTP client for Ruby!
The majority of other clients are built on top off Net::HTTP. This is the HTTP library built into Ruby, and it is slow... It also has a few annoying features, such as downcasing all headers. Oh, and they don't have a cool German name!
brauchbar is built on top of the patron gem, which itself is based upon libcurl. In other words, it has history. History is good. The brauchbar API is based upon a number of other good HTTP clients and is designed to be simple and easy to integrate to your application.
brauchbar doesn't introduce anything new into the world of HTTP clients, however it brings the best parts of all of them into one place, which is accessible by a simple, future-proof API.
gem install brauchbar
Brauchbar.get "http://www.google.co.uk/search?hl=en&q=brauchbar&meta=&esrch=FT1"
Brauchbar.get "http://www.google.co.uk/search?hl=en&q=brauchbar&meta=&esrch=FT1",
:headers => { 'Accept' => 'text/html', 'User-Agent' => 'brauchbar test 1.0' }
res = Brauchbar.get "http://www.google.co.uk/search?hl=en&q=brauchbar&meta=&esrch=FT1"
# response body
# <html><head>.....</html>
puts res
# headers
# { 'Content-Type' => 'text/html' }
puts res.headers
# http status
# 200
puts res.status
Feel free to hack away at this, however I won't merge anything unless you have adequate tests for it! Once you have done, send a pull request.
brauchbar is licensed under a Creative Commons Attribution 2.0 UK: England & Wales License.