Added documentation about accessing header values

This commit is contained in:
Bo Pace 2016-10-17 14:10:05 -06:00
parent 7e20725eb7
commit bfe28ae707
1 changed files with 7 additions and 1 deletions

View File

@ -507,7 +507,13 @@ Response objects
.. attribute:: Response.headers
A dictionary-like object which contains the response headers.
A dictionary-like object which contains the response headers. Values can
be accessed from the :class:`headers` object by using :meth:`get` to
return the first header value with the specified name or :meth:`getlist`
to return all header values with the specified name. For example, this
call will give you all cookies in the headers::
response.headers.getlist('Set-Cookie')
.. attribute:: Response.body