From bcc2befd0e9c1885e45b46d0b0bcdc11def8b249 Mon Sep 17 00:00:00 2001 From: Tom Carrick Date: Tue, 14 Jul 2020 13:32:24 +0200 Subject: Fixed #31789 -- Added a new headers interface to HttpResponse. --- docs/topics/testing/tools.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/topics/testing') diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 741acd604c..6d96731c79 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -551,9 +551,9 @@ Specifically, a ``Response`` object has the following attributes: If the given URL is not found, accessing this attribute will raise a :exc:`~django.urls.Resolver404` exception. -You can also use dictionary syntax on the response object to query the value -of any settings in the HTTP headers. For example, you could determine the -content type of a response using ``response['Content-Type']``. +As with a normal response, you can also access the headers through +:attr:`.HttpResponse.headers`. For example, you could determine the content +type of a response using ``response.headers['Content-Type']``. Exceptions ---------- -- cgit v1.3