httpclient: A Ruby HTTP client for serious business

Updated . Posted . Visible to the public.

While debugging an intricate issue with failed HTTP requests I have come to appreciate the more advanced features of the httpclient Show archive.org snapshot Rubygem.

The gem is much more than a lightweight wrapper around Ruby's net/http. In particular:

  • A single HTTPClient instance can re-use persistent connections across threads in a thread-safe way.
  • Has a custom and configurable SSL certificate store (which you probably want to disable by default)
  • Manages cookies
  • Can make asynchronous requests (spins off a thread internally)
  • Allow to set a debugging device where all request data will be piped to

More analysis of httpclient internals can be found in the attached article Show archive.org snapshot .

Other people's choices

Profile picture of Henning Koch
Henning Koch
Last edit
Jonas Schiele
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2015-09-18 09:24)