googleapis / googleapis/google-api-ruby-client

allow setting the faraday adapter to use

Aperta
#27,339 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
api: storage type: feature request
Lingua principale
Ruby
Stelle
2.9k
Fork
888
Merge medio
6m
PR unite (30g)
218

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
ruby
Ambito
api
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.