lostisland /faraday
Simple, but flexible HTTP client library, with support for multiple backends.
★ 5,956⑂ 1,034👁 85⑃ 983● 701▤ 117
+0
日增长
5,956
stars
1,034
forks
85
watchers
983
prs
701
issues
117
releases
README
![Faraday][website] Faraday is an HTTP client library abstraction layer that provides a common interface over many adapters (such as Net::HTTP) and embraces the concept of Rack middleware when processing the request/response cycle. Take a look at [Awesome Faraday][awesome] for a list of available adapters and middleware. Why use Faraday? Faraday gives you the power of Rack middleware for manipulating HTTP requests and responses, making it easier to build sophisticated API clients or web service libraries that abstract away the details of how HTTP requests are made. Faraday comes with a lot of features out of the box, such as: Support for multiple adapters (Net::HTTP, Typhoeus, Patron, Excon, HTTPClient, and more) Persistent connections (keep-alive) Parallel requests Automatic response parsing (JSON, XML, YAML) Customization of the request/response cycle with middleware Support for streaming responses Support for uploading files And much more! Getting Started The best starting point is the [Faraday Website][website], with its introduction and explanation. Need more details? See the [Faraday API Documentation][apidoc] to see how it works internally, or take a look at Advanced techniques for calling HTTP APIs in Ruby blog post from @mattbrictson 🚀 Supported Ruby versions This library aims to support and is [tested against][actions] the currently officially supported Ruby implementations. This means that, even without a major release, we could add or drop support for Ruby versions, following their EOL. Currently that means we support Ruby 3.0+ If something doesn't work on one of these Ruby versions, it's a bug. This library may inadvertently work (or seem to work) on other Ruby implementations and versions, however support will only be provided for the versions listed above. If you would like this library to support another Ruby version, 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. Contribute Do you want to contribute to Faraday? Open the issues page and check for the help wanted label! But before you start coding, please read our [Contributing Guide][contributing] Copyright © 2009 - 2026, the Faraday Team. Website and branding design by Elena Lo Piccolo. [awesome]: https://github.com/lostisland/awesome-faraday/adapters [website]: https://lostisland.github.io/faraday [contributing]: https://github.com/lostisland/faraday/blob/main/.github/CONTRIBUTING.md [apidoc]: https://www.rubydoc.info/github/lostisland/faraday [actions]: https://github.com/lostisland/faraday/actions
Top issues
#718Distinguish TimeoutErrors for open and read timeouts33 comments · 2017-08-09#1381Instrumentation middleware cannot work with async requests16 comments · 2022-01-13#1168Feature Request: explicit method defs for HTTP verbs12 comments · 2020-07-17#1611Please add support for the `QUERY` HTTP method9 comments · 2025-01-11#1065`middleware_mutex` is racey.9 comments · 2019-10-23#535Requests can no longer be converted to simple JSON8 comments · 2015-10-13#1586Support ciphers SSLOptions setting across adapters7 comments · 2024-08-29#1186Feature Request: Add an additional method on Response that allows you to see the resolved IP of the Response6 comments · 2020-10-07
Discussions
#1646Error Handling - PUT vs POST and response objects0 comments · 2025-11-12#1627Include URL in response error message2 comments · 2025-06-18#1619Thanks!1 comments · 2025-04-23#1612Using a reverse proxy with basic auth not working.3 comments · 2025-01-13#1566How can I stop the request inside on_data.3 comments · 2024-06-13#1543Drop Ruby < 3.0 support2 comments · 2023-12-25#1533webdav support2 comments · 2023-11-14#1527Performing Preflight Requests Inside Middleware1 comments · 2023-09-29
Latest release
v2.15.1 v2.15.1 2026-10-26What's Changed Decode indexed nested arrays in numeric order by @afurm in https://github.com/lostisland/faraday/pull/1723 Make Connectiondup public and rebuild its middleware stack by @JelF in https://github.com/lostisland/faraday/pull/1718 Fix FrozenError when a frozen URI is passed as the base URL by @hikmetba-bit in https://github.com/lostisland/faraday/pull/1717 [LOW] Bound memory retained by remote header names by @OskarEichler in https://github.com/lostisland/faraday/pull/1698 Apply logging filters to exception messages by @OskarEichler in https://github.com/lostisland/faraday/