Merry Christmas! After 4 years, the "http" gem (a.k.a. http.rb) has finally hit 1.0:
gem install http
http.rb provides an elegant, chainable interface for building HTTP requests, similar to Python's "Requests" library. Think JQuery for building HTTP requests. Its API is hopefully intuitive and just does what you expect (unlike, say, Net::HTTP).
This gem provides an almost pure Ruby implementation of the HTTP protocol, except for its use of http_parser.rb, which uses the Node.js HTTP parser written in C (and a Java port thereof on JRuby). This means http.rb has no reliance on Net::HTTP, and thanks to the native HTTP parser is faster than pure Ruby implementations of the HTTP protocol such as excon. It's use of a native parser is somewhat analogous to a client side Mongrel or Unicorn vs a pure Ruby WEBrick.
In the past year it's gained a number of features, most notably: support for persistent "keep-alive" connections and fine-grained timeouts implemented using asynchronous I/O instead of timeout.rb's thread-based approach. This gem is now the main client for service-to-service HTTP communication for Ruby apps at Square.
I'd like to thank Zach Anker for his many contributions to this library in the past year, as well as Alexey V. Zapparov and Erik Michaels-Ober for their ongoing contributions.
--
Tony Arcieri