title: Obtaining response cookies in Python prior to redirects without disabling redirects
body: <p>I am using the Python Requests library and there's a request that auto-redirects unless I disable redirects. I need to obtain the response cookies AND a cross site request forgery token (xsrf) from response.text. The reason for this is I need to use both in subsequent requests. I can easily obtain the response cookies by setting allow_redirect=false. The problem with this is by doing so I cannot ALSO obtain the xsrf token from the same request.</p>
  <p>I have tried this example (<a href="https://stackoverflow.com/questions/36391272/python-requests-how-to-get-response-cookie-from-302-redirect">Python Requests : How to get response cookie from 302 redirect</a>), but it doesn't work (it cannot obtain both cookies and the xsrf token) because I think you need to obtain the response cookies as well as the xrsf token using only ONE request.</p>
  <p>Is there a way to obtain the response cookies just before the redirect (302) occurs without setting allow_redirect=false so you can also obtain the xsrf token using only 1 request?</p>