OSS TanbouSign in with GitHub

Use one Ruby HTTP API while composing adapters and middleware for each client workload

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
5,951
Primary language
Ruby
License
MIT
Repository last updated
Sep 16, 2026
On this page

Overview

Faraday is a Ruby HTTP client library for calling APIs and web services. Beneath a common Connection API, applications can select an adapter such as Net::HTTP and compose middleware for authentication, JSON conversion, logging, and error handling. This keeps call-site structure more stable when transport implementations change.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Centralize connection settings and request-response processing

Faraday.new groups a base URL, headers, query parameters, timeouts, and proxy settings, then exposes HTTP verbs through one Connection. Middleware can add authorization headers, encode and parse JSON, raise on 4xx and 5xx responses, and log traffic in an ordered stack.

Sources: [2][3]

Best fit

Fits Ruby applications that need consistent policy across external APIs

It fits API clients, gems, and web applications that want service-specific connection and error policy in one place. It is also useful when switching from the default Net::HTTP transport or reusing middleware across several APIs.

Sources: [1][2]

Before adoption

Pin Ruby, extra gems, and middleware order, then test failure behavior

Version 2.14.4 requires Ruby 3.0 or newer. Net::HTTP is the default adapter shipped through Faraday's dependencies, while other adapters are separate gems. Identify which features live in core versus external gems and pin compatible versions.

Middleware selection and order change request and response behavior. Test timeouts, retries, JSON parsing, 4xx and 5xx handling, and redaction of sensitive headers against the real API. Changing the global default Connection can also affect unrelated callers.

Sources: [1][4][2]

Official sources

  1. [1]Faraday v2.14.4 README(2026-10-04)
  2. [2]Faraday v2.14.4 Quick Start(2026-10-04)
  3. [3]Faraday v2.14.4 configuration(2026-10-04)
  4. [4]Faraday v2.14.4 gemspec(2026-10-04)
  5. [5]Faraday v2.14.4 release(2026-10-04)
Supplemental curator note

The key comparison point is centralizing authentication, JSON conversion, retries, logging, and other HTTP behavior instead of scattering it across API clients. Some adapters and middleware are separate gems, so review the required components and their maintenance status individually.

Try it in 3 steps

  1. 1

    Add the pinned gem to a Gemfile

    Install Faraday 2.14.4 in an empty demo directory. Ruby 3.0 or newer and Bundler are required.

    mkdir -p faraday-demo && cd faraday-demo && printf "source 'https://rubygems.org'\ngem 'faraday', '2.14.4'\n" > Gemfile && bundle install
  2. 2

    Create a small GET request

    Create a request to the public test service used by the official Quick Start and print only the status and content type. Continue in the same terminal from step 1; the current directory is faraday-demo.

    printf "require 'faraday'\nresponse = Faraday.get('https://httpbingo.org/get')\nputs [response.status, response.headers['content-type']].join(' ')\n" > request.rb
  3. 3

    Run it through Bundler

    From the same faraday-demo directory used in step 2, run with the pinned dependency set. Real clients should add timeouts, error policy, and secure authentication handling to a Connection.

    bundle exec ruby request.rb
Check the official README

Growth

Growth trends · Last 30 days

5,951 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
5
Open PRs
29

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data
Stars
5,951
Forks
1,027
Watchers
87
Open issues
51
Contributors
264
Owner type
Organization
Primary language
Ruby
License
MIT
Repository last updated
Sep 16, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?