diff options
| author | MAHANTH-wq <vallulrimahanthkumar@gmail.com> | 2020-10-01 11:05:59 +0530 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-10-01 11:00:32 +0200 |
| commit | 6b17d13f26c17f9d4c9debe4d2731bff426b46b9 (patch) | |
| tree | 0d42a22634144ef3819f846c40123886d1791c8e /docs | |
| parent | 079e76621752e5a2d243ec8ad85241294f0cde28 (diff) | |
[3.1.x] Fixed #32057 -- Doc'd HttpResponse.get()/items().
Backport of 0da212ffbf5f22cfb1ad1f11bc30a45cee2fce82 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/request-response.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index fa5d6fc259..ca243cbf37 100644 --- a/docs/ref/request-response.txt +++ b/docs/ref/request-response.txt @@ -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. |
