Skip to content

Commit 0da212f

Browse files
MAHANTH-wqfelixxm
authored andcommitted
Fixed #32057 -- Doc'd HttpResponse.get()/items().
1 parent 85fa24e commit 0da212f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/ref/request-response.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,11 +843,20 @@ Methods
843843

844844
Returns the value for the given header name. Case-insensitive.
845845

846+
.. method:: HttpResponse.get(header, alternate=None)
847+
848+
Returns the value for the given header, or an ``alternate`` if the header
849+
doesn't exist.
850+
846851
.. method:: HttpResponse.has_header(header)
847852

848853
Returns ``True`` or ``False`` based on a case-insensitive check for a
849854
header with the given name.
850855

856+
.. method:: HttpResponse.items()
857+
858+
Acts like :meth:`dict.items` for HTTP headers on the response.
859+
851860
.. method:: HttpResponse.setdefault(header, value)
852861

853862
Sets a header unless it has already been set.

0 commit comments

Comments
 (0)