googleapis / googleapis/google-api-ruby-client

allow setting the faraday adapter to use

Open
#27,339 0 comments 0 reactions 0 assignees View on GitHub
api: storage type: feature request
Dominant language
Ruby
Stars
2.9k
Forks
888
Avg merge
6m
Merged PRs (30d)
218

Description

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

Contributor guide

Open the contributing guide

Research direction

Start at the Google::Apis::ClientOptions.default entry point and trace how the Faraday client selects its adapter. Check the existing client configuration and adapter-related tests, then verify that setting :adapter to :httpx or :net_http_persistent changes the default adapter without breaking the existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.