{"id":13879090,"url":"https://github.com/HoneyryderChuck/httpx","last_synced_at":"2025-07-16T15:31:34.111Z","repository":{"id":37253074,"uuid":"132919343","full_name":"HoneyryderChuck/httpx","owner":"HoneyryderChuck","description":"(Mirror) An HTTP client library for ruby","archived":false,"fork":false,"pushed_at":"2025-07-11T18:25:01.000Z","size":10623,"stargazers_count":221,"open_issues_count":2,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-07-11T18:39:58.210Z","etag":null,"topics":["http-client","http2-client","https","ruby"],"latest_commit_sha":null,"homepage":"https://gitlab.com/os85/httpx","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HoneyryderChuck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-05-10T15:26:44.000Z","updated_at":"2025-07-04T06:55:11.000Z","dependencies_parsed_at":"2023-10-13T08:56:06.872Z","dependency_job_id":"91ff7cc5-836e-4884-bb1f-d2ba80f93c2d","html_url":"https://github.com/HoneyryderChuck/httpx","commit_stats":null,"previous_names":[],"tags_count":123,"template":false,"template_full_name":null,"purl":"pkg:github/HoneyryderChuck/httpx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HoneyryderChuck%2Fhttpx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HoneyryderChuck%2Fhttpx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HoneyryderChuck%2Fhttpx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HoneyryderChuck%2Fhttpx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HoneyryderChuck","download_url":"https://codeload.github.com/HoneyryderChuck/httpx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HoneyryderChuck%2Fhttpx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265521426,"owners_count":23781500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http-client","http2-client","https","ruby"],"created_at":"2024-08-06T08:02:09.528Z","updated_at":"2025-07-16T15:31:34.095Z","avatar_url":"https://github.com/HoneyryderChuck.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# HTTPX: A Ruby HTTP library for tomorrow... and beyond!\n\n[![Gem Version](https://badge.fury.io/rb/httpx.svg)](http://rubygems.org/gems/httpx)\n[![pipeline status](https://gitlab.com/os85/httpx/badges/master/pipeline.svg)](https://gitlab.com/os85/httpx/pipelines?page=1\u0026scope=all\u0026ref=master)\n[![coverage report](https://gitlab.com/os85/httpx/badges/master/coverage.svg?job=coverage)](https://os85.gitlab.io/httpx/coverage/#_AllFiles)\n\nHTTPX is an HTTP client library for the Ruby programming language.\n\nAmong its features, it supports:\n\n* HTTP/2 and HTTP/1.x protocol versions\n* Concurrent requests by default\n* Simple and chainable API\n* Proxy Support (HTTP(S), Socks4/4a/5)\n* Simple Timeout System\n* Lightweight by default (require what you need)\n\nAnd also:\n\n* Compression (gzip, deflate, brotli)\n* Streaming Requests\n* Auth (Basic Auth, Digest Auth, NTLM)\n* Expect 100-continue\n* Multipart Requests\n* Advanced Cookie handling\n* HTTP/2 Server Push\n* HTTP/1.1 Upgrade (support for \"h2c\", \"h2\")\n* Automatic follow redirects\n* GRPC\n* WebDAV\n* Circuit Breaker\n* HTTP-based response cache\n* International Domain Names\n\n## How\n\nHere are some simple examples:\n\n```ruby\nHTTPX.get(\"https://nghttp2.org\").to_s #=\u003e \"\u003c!DOCT....\"\n```\n\nAnd that's the simplest one there is. But you can also do:\n\n```ruby\nHTTPX.post(\"http://example.com\", form: { user: \"john\", password: \"pass\" })\n\nhttp = HTTPX.with(headers: { \"x-my-name\" =\u003e \"joe\" })\nhttp.patch(\"http://example.com/file\", body: File.open(\"path/to/file\")) # request body is streamed\n```\n\nIf you want to do some more things with the response, you can get an `HTTPX::Response`:\n\n```ruby\nresponse = HTTPX.get(\"https://nghttp2.org\")\nputs response.status #=\u003e 200\nbody = response.body\nputs body #=\u003e #\u003cHTTPX::Response ...\n```\n\nYou can also send as many requests as you want simultaneously:\n\n```ruby\npage1, page2, page3 = HTTPX.get(\"https://news.ycombinator.com/news\", \"https://news.ycombinator.com/news?p=2\", \"https://news.ycombinator.com/news?p=3\")\n```\n\n## Installation\n\nAdd this line to your Gemfile:\n\n```ruby\ngem \"httpx\"\n```\n\nor install it in your system:\n\n```\n\u003e gem install httpx\n```\n\nand then just require it in your program:\n\n```ruby\nrequire \"httpx\"\n```\n\n## What makes it the best ruby HTTP client\n\n\n### Concurrency, HTTP/2 support\n\n`httpx` supports HTTP/2 (for \"https\" requests, it'll automatically do ALPN negotiation). However if the server supports HTTP/1.1, it will use HTTP pipelining, falling back to 1 request at a time if the server doesn't support it either (and it'll use Keep-Alive connections, unless the server does not support).\n\nIf you passed multiple URIs, it'll perform all of the requests concurrently, by mulitplexing on the necessary sockets (and it'll batch requests to the same socket when the origin is the same):\n\n```ruby\nHTTPX.get(\n  \"https://news.ycombinator.com/news\",\n  \"https://news.ycombinator.com/news?p=2\",\n  \"https://google.com/q=me\"\n) # first two requests will be multiplexed on the same socket.\n```\n\n### Clean API\n\n`httpx` builds all functions around the `HTTPX` module, so that all calls can compose of each other. Here are a few examples:\n\n```ruby\nresponse = HTTPX.get(\"https://www.google.com\", params: { q: \"me\" })\nresponse = HTTPX.post(\"https://www.nghttp2.org/httpbin/post\", form: { name: \"John\", age: \"22\" })\nresponse = HTTPX.plugin(:basic_auth)\n                .basic_auth(\"user\", \"pass\")\n                .get(\"https://www.google.com\")\n\n# more complex client objects can be cached, and are thread-safe\nhttp = HTTPX.plugin(:expect).with(headers: { \"x-pvt-token\" =\u003e \"TOKEN\" })\nhttp.get(\"https://example.com\") # the above options will apply\nhttp.post(\"https://example2.com\", form: { name: \"John\", age: \"22\" }) # same, plus the form POST body\n```\n\n### Lightweight\n\nIt ships with most features published as a plugin, making vanilla `httpx` lightweight and dependency-free, while allowing you to \"pay for what you use\"\n\nThe plugin system is similar to the ones used by [sequel](https://github.com/jeremyevans/sequel), [roda](https://github.com/jeremyevans/roda) or [shrine](https://github.com/shrinerb/shrine).\n\n### Advanced DNS features\n\n`HTTPX` ships with custom DNS resolver implementations, including a native Happy Eyeballs resolver implementation, and a DNS-over-HTTPS resolver.\n\n## User-driven test suite\n\nThe test suite runs against [httpbin proxied over nghttp2](https://nghttp2.org/httpbin/), so actual requests are performed during tests.\n\n## Supported Rubies\n\nAll Rubies greater or equal to 2.7, and always latest JRuby and Truffleruby.\n\n**Note**: This gem is tested against all latest patch versions, i.e. if you're using 3.3.0 and you experience some issue, please test it against 3.3.$latest before creating an issue.\n\n## Resources\n|               |                                                        |\n| ------------- | ------------------------------------------------------ |\n| Website       | https://honeyryderchuck.gitlab.io/httpx/               |\n| Documentation | https://honeyryderchuck.gitlab.io/httpx/rdoc/          |\n| Wiki          | https://honeyryderchuck.gitlab.io/httpx/wiki/home.html |\n| CI            | https://gitlab.com/os85/httpx/pipelines                |\n| Rubygems      | https://rubygems.org/gems/httpx                        |\n\n## Caveats\n\n## Versioning Policy\n\n`httpx` follows Semantic Versioning.\n\n## Contributing\n\n* Discuss your contribution in an issue\n* Fork it\n* Make your changes, add some tests (follow the instructions from [here](test/README.md))\n* Open a Merge Request (that's Pull Request in Github-ish)\n* Wait for feedback\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHoneyryderChuck%2Fhttpx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHoneyryderChuck%2Fhttpx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHoneyryderChuck%2Fhttpx/lists"}