class documentation
Undocumented
Method | get |
Receives a Response. Returns a redirect URI or ``None`` |
Method | rebuild |
When being redirected we may want to strip authentication from the request to avoid leaking credentials. This method intelligently removes and reapplies authentication where possible to avoid credential loss. |
Method | rebuild |
When being redirected we may want to change the method of the request based on certain specs or browser behavior. |
Method | rebuild |
This method re-evaluates the proxy configuration by considering the environment variables. If we are redirected to a URL covered by NO_PROXY, we strip the proxy configuration. Otherwise, we set missing proxy keys for this URL (in case they were stripped by a previous redirect). |
Method | resolve |
Receives a Response. Returns a generator of Responses or Requests. |
Method | should |
Decide whether Authorization header should be removed when redirecting |
When being redirected we may want to strip authentication from the request to avoid leaking credentials. This method intelligently removes and reapplies authentication where possible to avoid credential loss.
When being redirected we may want to change the method of the request based on certain specs or browser behavior.
This method re-evaluates the proxy configuration by considering the environment variables. If we are redirected to a URL covered by NO_PROXY, we strip the proxy configuration. Otherwise, we set missing proxy keys for this URL (in case they were stripped by a previous redirect). This method also replaces the Proxy-Authorization header where necessary. :rtype: dict