]> granicus.if.org Git - python/commitdiff
issue14427 - Document Request.get_header and Request.header_items
authorSenthil Kumaran <senthil@uthcode.com>
Sun, 29 Apr 2012 03:51:56 +0000 (11:51 +0800)
committerSenthil Kumaran <senthil@uthcode.com>
Sun, 29 Apr 2012 03:51:56 +0000 (11:51 +0800)
1  2 
Doc/library/urllib.request.rst

index 7aaadedc543563baf721096fd2e4294eee114889,db26b27bdf668c3483bdd46158938753b2e3f1d2..bce00b3a25439e35d2271bf6fd320afcfdb3a4cc
@@@ -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()