Skip to content

allow setting the faraday adapter to use#27337

Open
HoneyryderChuck wants to merge 1 commit into
googleapis:mainfrom
persona-id:faraday-adapter
Open

allow setting the faraday adapter to use#27337
HoneyryderChuck wants to merge 1 commit into
googleapis:mainfrom
persona-id:faraday-adapter

Conversation

@HoneyryderChuck

Copy link
Copy Markdown

The application I work on uses httpclient and relies on its persistent connection feature and request hedging to keep p99 google storage uploads to a minimum. v1 changed to faraday, which is understandable, but the default faraday adapter uses net-http, which does not do persistent requests, and would severely limit our ability to seamlessly upgrade.

This patch introduces a new client option, :adapter, which allows setting a default adapter (faraday has several) which supports persistent connections via:

Google::Apis::ClientOptions.default.adapter = :httpx # or
:net_http_persistent

@HoneyryderChuck HoneyryderChuck requested a review from a team as a code owner July 13, 2026 16:49
@google-cla

google-cla Bot commented Jul 13, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

The application I work on uses httpclient and relies on its persistent
connection feature and request hedging to keep p99 google storage
uploads to a minimum. v1 changed to faraday, which is understandable,
but the default faraday adapter uses net-http, which does not do
persistent requests, and would severely limit our ability to seamlessly
upgrade.

This patch introduces a new client option, `:adapter`, which allows
setting a default adapter (faraday has several) which supports
persistent connections via:

```ruby
Google::Apis::ClientOptions.default.adapter = :httpx # or :net_http_persistent
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant