theelous3 / asks

Async requests-like httplib for python.
MIT License
509 stars 63 forks source link

Add an option for not following redirects #166

Closed ehaas closed 4 years ago

ehaas commented 4 years ago

Adds a new parameter follow_redirects which can be set to False to turn off automatic redirect following, so that the original 3xx response is returned. This allows the user to implement their own redirect logic - for example to inspect the Location header before following a redirect.

Default value is True which preserves the existing behavior.

theelous3 commented 4 years ago

Seems totally reasonable. Thanks!

Nice work on also including docs <3