From 6dc3003f16c704a0c96f79c41d3e8666f8a247fc Mon Sep 17 00:00:00 2001 From: Allan Crooks Date: Tue, 12 Sep 2017 23:13:03 +0100 Subject: [PATCH] Update documentation regarding response headers. --- 3.0-HISTORY.rst | 4 ++++ docs/user/quickstart.rst | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/3.0-HISTORY.rst b/3.0-HISTORY.rst index 31df0ca0..6b6c61be 100644 --- a/3.0-HISTORY.rst +++ b/3.0-HISTORY.rst @@ -66,5 +66,9 @@ - ``Response.raise_for_status()`` now returns the response object for good responses +- Use ``HTTPHeaderDict`` for response headers, allowing easier access to + individual values when multiple response headers are sent using the same + header name. + .. _#2002: https://github.com/kennethreitz/requests/issues/2002 .. _#2631: https://github.com/kennethreitz/requests/issues/2631 diff --git a/docs/user/quickstart.rst b/docs/user/quickstart.rst index 5b4640ea..3f31aa8d 100644 --- a/docs/user/quickstart.rst +++ b/docs/user/quickstart.rst @@ -418,6 +418,10 @@ represented in the dictionary within a single mapping, as per of the message, by appending each subsequent field value to the combined field value in order, separated by a comma. +If you do need to access each individual value sent with the same header, then +you can use the ``multiget`` method to get a sequence of all the values returned +for a particular header. + Cookies -------