Closed xpader closed 6 days ago
No, this is currently not possible. Why not create two HttpClient
instances?
I'm try to using one pool instance, use same connection pool. If using another instance, it will create new connection.
For example, request https://example.com/get-information
to get some information, need follow redirect to get finally response, and request https://example.com/url-redirect
don't follow redirect just parse redirect target url from header Location
.
You can still share the connection pool. I have just added an example to illustrate this: https://github.com/amphp/http-client/commit/7580dc20fe7d8c83ad5f453ac5995e8bfb5d1f45
Oh, so this can be done. I didn't expect it before, thank you.
Is there any way to disable follow redirects only for a request?
May be should have an attribute to disable FollowRedirects interceptor?
Like: