You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a suggestion, I often have the requirement to setup the adapter client for every request. For example, with the httpclient adapter I often need to do the following:
To save repeating myself, or otherwise creating my own "request" method, it would be nice if HTTPI allowed one to set a global block to be executed before each request to setup the client. Given that the adapter is set globally, it makes sense to allow an adapter-specific block to be set globally as well.
When a request is made, this block would be executed before the request-specific block. In the following example, force_basic_auth would be turned off for this particular request, but ssl_config.set_default_paths would remain set.
To save repeating myself, or otherwise creating my own "request" method, it would be nice if HTTPI allowed one to set a global block to be executed before each request to setup the client. Given that the adapter is set globally, it makes sense to allow an adapter-specific block to be set globally as well.
I like adapter_client_setup block. 👍
Feel free to send a PR.
I'm planning to merge #201 and #198 and release a 2.5.0 version.
We can add this feature on 2.5.0 or 2.5.1. Ok?
As a suggestion, I often have the requirement to setup the adapter client for every request. For example, with the httpclient adapter I often need to do the following:
To save repeating myself, or otherwise creating my own "request" method, it would be nice if HTTPI allowed one to set a global block to be executed before each request to setup the client. Given that the adapter is set globally, it makes sense to allow an adapter-specific block to be set globally as well.
Something like this:
When a request is made, this block would be executed before the request-specific block. In the following example,
force_basic_auth
would be turned off for this particular request, butssl_config.set_default_paths
would remain set.Thoughts?
The text was updated successfully, but these errors were encountered: