adj, German. practical, convenient, utilizable, feasible AKA a decent HTTP client for Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Adj, German. practical, convenient, utilizable, feasible

In other words, a decent HTTP client for Ruby!


But what.... what is wrong with all the other client?

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!

So, this is special how?

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


Basic usage

Brauchbar.get ""

Headers can be added

Brauchbar.get "",
              :headers => { 'Accept' => 'text/html', 'User-Agent' => 'brauchbar test 1.0' }

A Response object is returned

res = Brauchbar.get ""

# 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.

Todo / What would be nice

  • POST requests with POST data
  • Remembering of cookies between requests
  • Changing of timeouts
  • HTTP authentication



brauchbar is licensed under a Creative Commons Attribution 2.0 UK: England & Wales License.

CC Some Rights Reserved