]> 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:50:39 +0000 (11:50 +0800)
committerSenthil Kumaran <senthil@uthcode.com>
Sun, 29 Apr 2012 03:50:39 +0000 (11:50 +0800)
Doc/library/urllib.request.rst

index 58f33e3a31bbf21833e9ed8819afc65623a24767..db26b27bdf668c3483bdd46158938753b2e3f1d2 100644 (file)
@@ -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