Skip to content
Myr

Correct redirection introduction

Before adoption: this commit came in with the history the project adopted, so no landing records it.

The history attribute contains responses, not requests. Thanks to Yang Yang for reporting this to me via email

authored by Ian Cordasco · committed by Ian Cordasco · parent 9b41308 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:docs/user/quickstart.rst+2 added-2 removed
367 unmodified lines
368369We can use the ``history`` property of the Response object to track redirection.370371The :meth:`Response.history <requests.Response.history>` list contains the372:class:`Request <requests.Request>` objects that were created in order to372:class:`Response <requests.Response>` objects that were created in order to373complete the request. The list is sorted from the oldest to the most recent374request.374response.375376For example, GitHub redirects all HTTP requests to HTTPS::377378 >>> r = requests.get('http://github.com')
67 unmodified lines