Allow HTTPClient to intercept / track multiple redirects
kylebrowning opened this issue · 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.
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?