HTTP libraries

What do we have?

Ruby’s built-in library: Net/HTTP and gems that powers Net/HTTP:

3rd-party libraries:

Based on Net/HTTP

REST Client, httparty, and Nestful.

Based on libcurl

curb, EM-HTTP-Request, Patron, and Typhoeus.

Pure Ruby

EM-Synchrony, excon, Faraday, httpclient, HTTPX, and net-http2.

Pure Ruby + http_parser.rb


Socks 5


There are probably many more I did not know about, what should we choose?

What people are using?

...Don’t worry, it’s very easy to evaluate.

What should I evaluate a HTTP library?

Let’s rule out gems that do not comes with what we want:

httparty does not have Keep-Alice support (you need persistent_httparty to keep the party alive). REST Client uses too much memory and currently the slowest. EM-* also requires multiple gems. Net/HTTP’s API is not very easy to use.

Now we still have many libraries to choose from. How about we consider some of HTTP/2 features? Now we left with only HTTPX...


Getting Started with HTTPX

See HTTPX wiki.