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

POST request always follow redirects #1557

Closed
ghost opened this issue Jan 25, 2017 · 2 comments
Closed

POST request always follow redirects #1557

ghost opened this issue Jan 25, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 25, 2017

POST requests made using the aiohttp ClientSession always follow redirect as the allow_redirects attribute cannot be set for this method.

Other methods (GET/OPTIONS/HEAD) do support enabling/disabling of HTTP redirects.

Allowing redirects to be set on POST request allows one to retrieve header information (such as the redirect specific HTTP code)

@fafhrd91
Copy link
Member

i can not find any code that prevents usage of allow_redirects, just pass allow_redirects

https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/client.py#L404

@ghost
Copy link
Author

ghost commented Jan 26, 2017

My bad. Apologies. Misread the code

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

1 participant