config item to follow redirects by default #2598
-
Hello. I wasn't sure if I should reopen/comment on #2126 or make a new issue. I've recently run into this change to the default behaviour around following redirects, and I'd like to be able to easily refactor my large codebase to set the default behaviour back. I'd also like be able to change the default to prevent other coders who may be unaware of this behaviour from inadvertently doing a What I'd like to do is have a new config item in httpx._config similar to I'd like to do this to allow for usage like: import httpx
httpx.DEFAULT_FOLLOW_REDIRECTS = True
httpx.get(some_url) rather than having to either pass I think I could put together a PR to do this change, would that be likely to be accepted if I were to do so? Is there anything I should know before I write the code? :) Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Thank you for the suggestion, appreciate your involvement. I don't think we'd be likely to accept a package-level config item. It wouldn't be consistent with the API that we're using elsewhere throughout this project. |
Beta Was this translation helpful? Give feedback.
-
maybe I'm missing something. How would a DEFAULT_FOLLOW_REDIRECTS be inconsistent with the existing DEFAULT_MAX_REDIRECTS? |
Beta Was this translation helpful? Give feedback.
Thank you for the suggestion, appreciate your involvement.
I don't think we'd be likely to accept a package-level config item. It wouldn't be consistent with the API that we're using elsewhere throughout this project.