From 8dc500476a3c176e10ae2f969235b5498c6b0393 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sun, 29 Apr 2012 11:50:39 +0800 Subject: [PATCH] issue14427 - Document Request.get_header and Request.header_items --- Doc/library/urllib.request.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst index 58f33e3a31b..db26b27bdf6 100644 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@ -447,6 +447,17 @@ request. Return the selector --- the part of the URL that is sent to the server. +.. method:: Request.get_header(header_name, default=None) + + Return the value of the given header. If the header is not present, return + the default value. + + +.. method:: Request.header_items() + + Return a list of tuples (header_name, header_value) of the Request headers. + + .. method:: Request.set_proxy(host, type) Prepare the request by connecting to a proxy server. The *host* and *type* will