async-http-client icon indicating copy to clipboard operation
async-http-client copied to clipboard

Allow HTTPClient to intercept / track multiple redirects

Open kylebrowning opened this issue 3 years ago • 1 comments

Title says it all. Tesla's Auth API requires 2 redirects to be followed, one of which has a token in as a query parameter in the URL.

It seems with the current implementation of HTTPClient I can only stop all redirects, and follow them myself.

It would be nice to just have a history available of all redirects following when a request is finished.

kylebrowning avatar Jul 20 '22 15:07 kylebrowning

Yeah, fine-grained control over the redirect process is something I've wanted for a long time. Building this feature out fully is a little complex, as we'd need support for pluggable redirect strategies and some way to pass data around, as well as simply a history. A history, however, is something we can definitely provide.

In the meantime, is following the redirects yourself sufficient?

Lukasa avatar Jul 22 '22 08:07 Lukasa