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

index b66ebd73d8f381c6dab1750c51d475b2ba3bc557..463eb458981d4c3ea6c9daba9c266951c2e46c6b 100644 (file)
@@ -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