Skip to content

lostisland/awesome-faraday

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 

Repository files navigation

Awesome Faraday

A curated list of awesome middleware and adapters for Faraday. If you want your adapter or middleware to feature in this list, please open a discussion or a PR.

Adapters

Faraday allows you to change the adapter, the element in the stack responsible for performing the HTTP request, with ease, by the combination of a standardised API to provide configuration and request details, and a powerful set of middleware. However, each adapter can also offer unique features, or lack the support for others. The following table show the available adapters and which features they support.

Adapter Bundled with Faraday Reason Phrase parsing Compression (Gzip, Deflate) Response Streaming Parallel Requests GET, HEAD, DELETE, TRACE Request Body HEAD Response Body TRACE Method Local Socket Binding
EM::HTTP v1 only ✔️ ✖️ ✖️ ✔️ ✔️ ✖️ ✔️ ✔️
EM::Synchrony v1 only ✔️ ✖️ ✖️ ✔️ ✔️ ✖️ ✔️ ✔️
Excon v1 only ✔️ ✖️ ✖️ ✖️ ✔️ ✔️ ✔️ ✖️
HttpClient v1 only ✔️ ✔️ ✖️ ✖️ ✔️ ✔️ ✔️ ✔️
Net::HTTP v1 only ✔️ ✔️ ✔️ ✖️ ✔️ ✔️ ✔️ ✖️
Net::HTTP::Persistent v1 only ✔️ ✔️ ✖️ ✖️ ✔️ ✔️ ✔️ ✖️
Patron v1 only ✔️ ✖️ ✖️ ✖️ ✖️ ✔️ ✖️ ✖️
Typhoeus v1 only ✖️ ✖️ ✖️ ✔️ ✔️ ✔️ ✔️ ✖️
HTTP.rb ✖️ ✔️ ✖️ ✖️ ✖️ ✔️ ✖️ ✔️ ✔️
httpx ✖️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️ ✔️

Middleware

Under the hood, Faraday uses a Rack-inspired middleware stack for making requests. Much of Faraday’s power is unlocked with custom middleware. Some middleware is included with Faraday, and others are in external gems. Learn more about Middleware.

In addition to this curated list of middleware, we would like to specifically call your attention to middleware that is helpful for general HTTP use:

  • encode_xml - encode XML requests (responses decoding is included in faraday_middleware gem)
  • encoding - required for handling UTF-8 responses
  • follow_redirects - follow HTTP 30X redirects
  • json - encode/decode JSON requests and responses
  • retry - retry intermittent HTTP failures
  • url_encoded - encode request body as a url-encoded form upload

Awesome Community Middleware

Included with faraday itself

Bundled into their own gems

faraday_middleware gem

ATTENTION: faraday_middleware have been deprecated and won't be updated to work on Faraday 2.0. All the middleware below will need to be moved into their own gems.

Body Types

TBC

About

A curated list of awesome middleware and adapters for Faraday

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published