Skip to content
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

Allow HTTPClient to intercept / track multiple redirects #604

Open
kylebrowning opened this issue Jul 20, 2022 · 1 comment
Open

Allow HTTPClient to intercept / track multiple redirects #604

kylebrowning opened this issue Jul 20, 2022 · 1 comment

Comments

@kylebrowning
Copy link

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 kylebrowning changed the title Allow HTTPClient to intercept multiple redirects Allow HTTPClient to intercept / track multiple redirects Jul 20, 2022
@Lukasa
Copy link
Collaborator

Lukasa commented Jul 22, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants