New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to configure net http persistent client #262
Comments
👍 I'd like to have the ability to configure the connection as well. Not necessarily through request options in conn.adapter :net_http_persistent do |http|
http.stuff = :moo
end |
Ooh yea, I like the block configuration interface. |
I am encountering similar difficulties as I'm attempting to implement an adapter for Excon that enables persistent connections. If the adapter re-uses the same Excon object multiple times, then it is difficult to ensure that new settings on the individual request take effect on the Excon object. If I make the adapter create a new object each time, then as you mention the initial settings must be given to the object each time. The behavior of Faraday vs. the adapter in terms of globally configured settings vs. per-request settings (some of them probably can't be per-request) seems a bit unclear to me. |
👍 Is this implemented ? Thanks |
This is now implemented and released as of v0.11.0 😃 |
Currently, it's not possibly through the api to configure the
idle_timeout
, because the faraday net http persistent adapter instantiates a newNet::HTTP::Persistent
instance on each request. The library is smart enough to use the same connection across instances for performing http requests, but it configuration options such asidle_timeout
must be configured on a per-object basis. Has this been an issue with other adapters, that needed custom configuration passed to it? Thanks.The text was updated successfully, but these errors were encountered: