adafruit / Adafruit_CircuitPython_Requests

Requests-like interface for web interfacing
MIT License
51 stars 37 forks source link

implement allow_redirects argument #132

Closed FoamyGuy closed 1 year ago

FoamyGuy commented 1 year ago

this change adds the allow_redirects argument to the request methods. It defaults to True so that current behavior stays the same for anyone who doesn't explicitly change the argument to False.

If it's False it will return the redirect response (300 level status code) to the caller that initiated the request instead of automatically following the redirect and returning the final response to the caller.

This matches the functionality in the CPython requests library API