[Python-checkins] cpython (3.2): issue14427 - Document Request.get_header and Request.header_items

senthil.kumaran python-checkins at python.org
Sun Apr 29 05:53:21 CEST 2012


http://hg.python.org/cpython/rev/6a9f100e138c
changeset:   76608:6a9f100e138c
branch:      3.2
parent:      76606:1a9d38966395
user:        Senthil Kumaran <senthil at uthcode.com>
date:        Sun Apr 29 11:50:39 2012 +0800
summary:
  issue14427 - Document Request.get_header and Request.header_items

files:
  Doc/library/urllib.request.rst |  11 +++++++++++
  1 files changed, 11 insertions(+), 0 deletions(-)


diff --git a/Doc/library/urllib.request.rst b/Doc/library/urllib.request.rst
--- a/Doc/library/urllib.request.rst
+++ b/Doc/library/urllib.request.rst
@@ -447,6 +447,17 @@
    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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list