[3.1.x] Fixed #32057 -- Doc'd HttpResponse.get()/items().

Backport of 0da212ffbf from master
This commit is contained in:
MAHANTH-wq 2020-10-01 11:05:59 +05:30 committed by Mariusz Felisiak
parent 079e766217
commit 6b17d13f26
1 changed files with 9 additions and 0 deletions

View File

@ -832,11 +832,20 @@ Methods
Returns the value for the given header name. Case-insensitive.
.. method:: HttpResponse.get(header, alternate=None)
Returns the value for the given header, or an ``alternate`` if the header
doesn't exist.
.. method:: HttpResponse.has_header(header)
Returns ``True`` or ``False`` based on a case-insensitive check for a
header with the given name.
.. method:: HttpResponse.items()
Acts like :meth:`dict.items` for HTTP headers on the response.
.. method:: HttpResponse.setdefault(header, value)
Sets a header unless it has already been set.