From 9fe4a9936572e638dad2db30fffd6b38b0b74f66 Mon Sep 17 00:00:00 2001 From: karl Date: Thu, 12 Jul 2012 16:34:28 -0400 Subject: [PATCH] adding clarification to the history API. It was not clear how the history list was sorted. --- docs/user/quickstart.rst | 2 +- requests/models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index d0b20de..d3e786c 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -386,7 +386,7 @@ of the Response object to track redirection. Let's see what Github does:: [] The :class:`Response.history` list contains a list of the -:class:`Request` objects that were created in order to complete the request. +:class:`Request` objects that were created in order to complete the request. The list is sorted from the oldest to the most recent request. If you're using GET or OPTIONS, you can disable redirection handling with the ``allow_redirects`` parameter:: diff --git a/requests/models.py b/requests/models.py index 928cc2c..8223f54 100644 --- a/requests/models.py +++ b/requests/models.py @@ -660,7 +660,7 @@ class Response(object): #: A list of :class:`Response ` objects from #: the history of the Request. Any redirect responses will end - #: up here. + #: up here. The list is sorted from the oldest to the most recent request. self.history = [] #: The :class:`Request ` that created the Response. -- 2.34.1