From: Senthil Kumaran Date: Sun, 29 Apr 2012 03:51:56 +0000 (+0800) Subject: issue14427 - Document Request.get_header and Request.header_items X-Git-Tag: v3.3.0a3~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b7698c468642f7013a8fd21f46eb41aba8dde42;p=python issue14427 - Document Request.get_header and Request.header_items --- 4b7698c468642f7013a8fd21f46eb41aba8dde42 diff --cc Doc/library/urllib.request.rst index 7aaadedc54,db26b27bdf..bce00b3a25 --- a/Doc/library/urllib.request.rst +++ b/Doc/library/urllib.request.rst @@@ -498,18 -445,30 +498,30 @@@ request .. method:: Request.get_selector() Return the selector --- the part of the URL that is sent to the server. + Deprecated in 3.3, use :attr:`Request.selector`. + .. deprecated:: 3.3 + .. 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 - replace those of the instance, and the instance's selector will be the original - URL given in the constructor. - - .. method:: Request.get_origin_req_host() - Return the request-host of the origin transaction, as defined by :rfc:`2965`. - See the documentation for the :class:`Request` constructor. + Return the request-host of the origin transaction, as defined by + :rfc:`2965`. See the documentation for the :class:`Request` constructor. + Deprecated in 3.3, use :attr:`Request.origin_req_host`. + + .. deprecated:: 3.3 .. method:: Request.is_unverifiable()