http.rb is an HTTP client library which exposes an easy-to-use chainable
API for constructing HTTP requests:
To install it:
gem install http
To use it:
require 'http' HTTP.get("https://www.google.com").to_s
It’s that easy!
http.rb was previously named “The HTTP Gem” and located under “tarcieri”
Github, however we have rebranded and put it under its own organization
hopes of improving discoverability and SEO.
This library implements the HTTP protocol from-scratch without any
dependencies on Ruby’s Net::HTTP. It uses the http_parser.rb library, a
native extension containing the Node.js parser for CRubies and a Java
thereof for JRuby.
The entire library has been written from the ground up to support
The API is inspired in part by the Requests library from Python:
Full change log below:
- Fix handling of EOF which caused infinite loop. See #163, #166 and
- Drop Ruby 1.8.7 support. (@ixti)
- Fix default Host header value. See #150. (@ixti)
- Remove BearerToken authorization header. (@ixti)
#authsugar now accepts only string value of Authorization header.
#auth(:basic, opts)is deprecated, use
- Fix handling of chunked responses without Content-Length header.
HTTP::Response#codeare proxies them
to corresponding methods of
HTTP.followand mark former one as