Merge pull request #2135 from dpursehouse/fix-meth-and-class-directives

Docs: Fix :class: and :meth: directives
This commit is contained in:
Cory Benfield
2014-07-16 06:36:40 +01:00
2 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ request, and then the request's headers::
Prepared Requests
-----------------
Whenever you receive a :class:`Response <requests.models.Response>` object
Whenever you receive a :class:`Response <requests.Response>` object
from an API call or a Session call, the ``request`` attribute is actually the
``PreparedRequest`` that was used. In some cases you may wish to do some extra
work to the body or headers (or anything else really) before sending a
@@ -117,7 +117,7 @@ However, the above code will lose some of the advantages of having a Requests
:class:`Session <requests.Session>` object. In particular,
:class:`Session <requests.Session>`-level state such as cookies will
not get applied to your request. To get a
:class:`PreparedRequest <requests.models.PreparedRequest>` with that state
:class:`PreparedRequest <requests.PreparedRequest>` with that state
applied, replace the call to :meth:`Request.prepare()
<requests.Request.prepare>` with a call to
:meth:`Session.prepare_request() <requests.Session.prepare_request>`, like this::
+4 -3
View File
@@ -367,9 +367,10 @@ HEAD.
We can use the ``history`` property of the Response object to track redirection.
The :meth:`Response.history` list contains the :class:`Request` objects that
were created in order to complete the request. The list is sorted from the
oldest to the most recent request.
The :meth:`Response.history <requests.Response.history>` list contains the
:class:`Request <requests.Request>` objects that were created in order to
complete the request. The list is sorted from the oldest to the most recent
request.
For example, GitHub redirects all HTTP requests to HTTPS::