Skip to content
Myr

adding clarification to the history API. It was not clear how the history list was sorted.

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

authored by karl · committed by karl · parent 884fc33 · Browse files · 2 files+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

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:docs/user/quickstart.rst+1 added-1 removed
384 unmodified lines
385 >>> r.history386 [<Response [301]>]387388The :class:`Response.history` list contains a list of the389:class:`Request` objects that were created in order to complete the request.389:class:`Request` objects that were created in order to complete the request. The list is sorted from the oldest to the most recent request.390391If you're using GET or OPTIONS, you can disable redirection handling with the392``allow_redirects`` parameter::393
59 unmodified lines
modified:requests/models.py+1 added-1 removed
658 unmodified lines
659 self.encoding = None660661 #: A list of :class:`Response <Response>` objects from662 #: the history of the Request. Any redirect responses will end663 #: up here.663 #: up here. The list is sorted from the oldest to the most recent request.664 self.history = []665666 #: The :class:`Request <Request>` that created the Response.667 self.request = None
166 unmodified lines