A summary of data about the Ruby ecosystem.

https://github.com/httprb/http

HTTP (The Gem! a.k.a. http.rb) - a fast Ruby HTTP client with a chainable API, streaming support, and timeouts
https://github.com/httprb/http

Keywords

client http http-client ruby

Keywords from Contributors

activerecord activejob mvc rack rubygems crash-reporting rspec rubocop background-jobs static-code-analysis

Last synced: about 17 hours ago
JSON representation

Repository metadata

HTTP (The Gem! a.k.a. http.rb) - a fast Ruby HTTP client with a chainable API, streaming support, and timeouts

README.md

http.rb

Gem Version
MIT licensed
Build Status

Documentation

About

HTTP (The Gem! a.k.a. http.rb) is an easy-to-use client library for making requests
from Ruby. It uses a simple method chaining system for building requests, similar to
Python's Requests.

Under the hood, http.rb uses the llhttp parser, a fast HTTP parsing native extension.
This library isn't just yet another wrapper around Net::HTTP. It implements the HTTP
protocol natively and outsources the parsing to native extensions.

Why http.rb?

  • Clean API: http.rb offers an easy-to-use API that should be a
    breath of fresh air after using something like Net::HTTP.

  • Maturity: http.rb is one of the most mature Ruby HTTP clients, supporting
    features like persistent connections and fine-grained timeouts.

  • Performance: using native parsers and a clean, lightweight implementation,
    http.rb achieves high performance while implementing HTTP in Ruby instead of C.

Installation

Add this line to your application's Gemfile:

gem "http"

And then execute:

$ bundle

Or install it yourself as:

$ gem install http

Inside of your Ruby program do:

require "http"

...to pull it in as a dependency.

Documentation

Please see the http.rb wiki
for more detailed documentation and usage notes.

The following API documentation is also available:

Basic Usage

Here's some simple examples to get you started:

>> HTTP.get("https://github.com").to_s
=> "\n\n\n<!DOCTYPE html>\n<html lang=\"en\" class=\"\">\n  <head prefix=\"o..."

That's all it takes! To obtain an HTTP::Response object instead of the response
body, all we have to do is omit the #to_s on the end:

>> HTTP.get("https://github.com")
=> #<HTTP::Response/1.1 200 OK {"Server"=>"GitHub.com", "Date"=>"Tue, 10 May...>

We can also obtain an HTTP::Response::Body object for this response:

>> HTTP.get("https://github.com").body
=> #<HTTP::Response::Body:3ff756862b48 @streaming=false>

The response body can be streamed with HTTP::Response::Body#readpartial.
In practice, you'll want to bind the HTTP::Response::Body to a local variable
and call #readpartial on it repeatedly until it returns nil:

>> body = HTTP.get("https://github.com").body
=> #<HTTP::Response::Body:3ff756862b48 @streaming=false>
>> body.readpartial
=> "\n\n\n<!DOCTYPE html>\n<html lang=\"en\" class=\"\">\n  <head prefix=\"o..."
>> body.readpartial
=> "\" href=\"/apple-touch-icon-72x72.png\">\n    <link rel=\"apple-touch-ic..."
# ...
>> body.readpartial
=> nil

Supported Ruby Versions

This library aims to support and is tested against
the following Ruby versions:

  • Ruby 3.0
  • Ruby 3.1
  • Ruby 3.2
  • Ruby 3.3
  • Ruby 3.4
  • JRuby 9.4

If something doesn't work on one of these versions, it's a bug.

This library may inadvertently work (or seem to work) on other Ruby versions,
however support will only be provided for the versions listed above.

If you would like this library to support another Ruby version or
implementation, you may volunteer to be a maintainer. Being a maintainer
entails making sure all tests run and pass on that implementation. When
something breaks on your implementation, you will be responsible for providing
patches in a timely fashion. If critical issues for a particular implementation
exist at the time of a major release, support for that Ruby version may be
dropped.

Contributing to http.rb

  • Fork http.rb on GitHub
  • Make your changes
  • Ensure all tests pass (bundle exec rake)
  • Send a pull request
  • If we like them we'll merge them
  • If we've accepted a patch, feel free to ask for commit access!

Copyright

Copyright © 2011-2022 Tony Arcieri, Alexey V. Zapparov, Erik Michaels-Ober, Zachary Anker.
See LICENSE.txt for further details.


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 8 days ago

Total Commits: 1,195
Total Committers: 129
Avg Commits per committer: 9.264
Development Distribution Score (DDS): 0.641

Commits in past year: 12
Committers in past year: 4
Avg Commits per committer in past year: 3.0
Development Distribution Score (DDS) in past year: 0.333

Name Email Commits
Aleksey V Zapparov i****i@m****g 429
Tony Arcieri b****e@g****m 277
Erik Michaels-Ober s****k@g****m 65
Janko Marohnić j****c@g****m 47
Sam Phippen s****n@g****m 39
Bernard Lambeau b****u@g****m 34
Peter Williams p****a@b****g 31
Zach Anker z****r@s****m 26
Tony Arcieri t****i@s****m 19
Piotr Boniecki p****r@p****m 10
jwinter j****r@g****m 9
Paul Sadauskas p****s@g****m 9
Juanito Fatas k****0@g****m 8
Connor Dunn c****d@s****m 7
Ezekiel Templin z****e@t****n 7
Christian Schmidt g****b@c****k 5
Jason Nochlin h****t@g****m 5
Olle Jonsson o****n@g****m 5
Ori Pekelman o****i@p****m 5
Joshua Flanagan j****n@g****m 4
Kyle King k****g@g****m 4
Rick Song r****g@g****m 4
Ryan Hosford t****d@g****m 4
Bryan Powell b****n@m****m 4
Tyler Montgomery t****y@g****m 3
Smudge n****n@n****m 3
Nicolas Leger n****r 3
Mike Evans m****e@u****m 3
Michael Gee m****e@g****m 3
Matthew Witek m****t@m****m 3
and 99 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 18 days ago

Total issues: 83
Total pull requests: 113
Average time to close issues: about 1 year
Average time to close pull requests: 4 months
Total issue authors: 66
Total pull request authors: 58
Average comments per issue: 4.89
Average comments per pull request: 2.43
Merged pull request: 82
Bot issues: 0
Bot pull requests: 0

Past year issues: 10
Past year pull requests: 19
Past year average time to close issues: about 7 hours
Past year average time to close pull requests: 14 days
Past year issue authors: 8
Past year pull request authors: 4
Past year average comments per issue: 0.8
Past year average comments per pull request: 0.63
Past year merged pull request: 15
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/httprb/http

Top Issue Authors

  • ixti (9)
  • tarcieri (5)
  • ksylvest (2)
  • bkuhlmann (2)
  • nomis (2)
  • stoivo (2)
  • shaicoleman (2)
  • jgreben (1)
  • hugopassos (1)
  • tablecell (1)
  • james-em (1)
  • Linuus (1)
  • chrismanderson (1)
  • sunilkumarnagoore (1)
  • flosacca (1)

Top Pull Request Authors

  • ixti (16)
  • tarcieri (12)
  • c960657 (7)
  • benubois (4)
  • hakanensari (4)
  • sebyx07 (4)
  • bryanp (3)
  • koheisg (3)
  • Earlopain (2)
  • nomis (2)
  • midnight-wonderer (2)
  • Bertg (2)
  • alexcwatt (2)
  • TheBlackArroVV (2)
  • omkarmoghe (2)

Top Issue Labels

  • Improvement (6)
  • Bug (6)
  • Feature (4)
  • Pick Me! (3)
  • Security (2)
  • Discussion (2)
  • Regression (1)
  • Not a bug (1)

Top Pull Request Labels

  • Feature (3)
  • Discussion (1)

Package metadata

gem.coop: http

An easy-to-use client library for making requests from Ruby. It uses a simple method chaining system for building requests, similar to Python's Requests.

  • Homepage: https://github.com/httprb/http
  • Documentation: http://www.rubydoc.info/gems/http/
  • Licenses: MIT
  • Latest release: 5.3.1 (published 6 months ago)
  • Last Synced: 2025-12-09T18:32:08.212Z (3 days ago)
  • Versions: 104
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 187,901,645 Total
  • Docker Downloads: 1,820,749,480
  • Rankings:
    • Dependent repos count: 0.0%
    • Dependent packages count: 0.0%
    • Downloads: 0.129%
    • Average: 0.341%
    • Stargazers count: 0.428%
    • Forks count: 1.147%
  • Maintainers (4)
rubygems.org: http

An easy-to-use client library for making requests from Ruby. It uses a simple method chaining system for building requests, similar to Python's Requests.

proxy.golang.org: github.com/httprb/http

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/httprb/http#section-documentation
  • Licenses: mit
  • Latest release: v5.3.1+incompatible (published 6 months ago)
  • Last Synced: 2025-12-07T18:02:19.277Z (5 days ago)
  • Versions: 83
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 6.999%
    • Average: 8.173%
    • Dependent repos count: 9.346%

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • coverallsapp/github-action v1.1.2 composite
  • coverallsapp/github-action master composite
  • ruby/setup-ruby v1 composite
Gemfile rubygems
  • backports >= 0 development
  • certificate_authority ~> 1.0 development
  • fuubar >= 0 development
  • guard-rspec >= 0 development
  • kramdown >= 0 development
  • nokogiri >= 0 development
  • pry >= 0 development
  • pry-byebug >= 0 development
  • rspec ~> 3.10 development
  • rspec-its >= 0 development
  • rubocop ~> 1.30.0 development
  • rubocop-performance >= 0 development
  • rubocop-rake >= 0 development
  • rubocop-rspec >= 0 development
  • simplecov >= 0 development
  • simplecov-lcov >= 0 development
  • yard >= 0 development
  • yardstick >= 0 development
  • rake >= 0
  • webrick >= 0
http.gemspec rubygems
  • bundler ~> 2.0 development
  • addressable ~> 2.8
  • http-cookie ~> 1.0
  • http-form_data ~> 2.2
  • llhttp-ffi ~> 0.4.0

Score: 35.04177598183005