From: Senthil Kumaran Date: Sun, 29 Apr 2012 03:52:59 +0000 (+0800) Subject: issue14427 - Document Request.get_header and Request.header_items X-Git-Tag: v2.7.4rc1~870 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=429d311c2b6d499017516936347572d0199ec71a;p=thirdparty%2FPython%2Fcpython.git issue14427 - Document Request.get_header and Request.header_items --- diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst index b66ebd73d8f3..463eb458981d 100644 --- a/Doc/library/urllib2.rst +++ b/Doc/library/urllib2.rst @@ -380,6 +380,17 @@ so all must be overridden in subclasses. 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