Fixed #32057 -- Doc'd HttpResponse.get()/items().
This commit is contained in:
parent
85fa24e3eb
commit
0da212ffbf
|
@ -843,11 +843,20 @@ Methods
|
||||||
|
|
||||||
Returns the value for the given header name. Case-insensitive.
|
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)
|
.. method:: HttpResponse.has_header(header)
|
||||||
|
|
||||||
Returns ``True`` or ``False`` based on a case-insensitive check for a
|
Returns ``True`` or ``False`` based on a case-insensitive check for a
|
||||||
header with the given name.
|
header with the given name.
|
||||||
|
|
||||||
|
.. method:: HttpResponse.items()
|
||||||
|
|
||||||
|
Acts like :meth:`dict.items` for HTTP headers on the response.
|
||||||
|
|
||||||
.. method:: HttpResponse.setdefault(header, value)
|
.. method:: HttpResponse.setdefault(header, value)
|
||||||
|
|
||||||
Sets a header unless it has already been set.
|
Sets a header unless it has already been set.
|
||||||
|
|
Loading…
Reference in New Issue