[Python-checkins] cpython (2.7): issue14427 - Document Request.get_header and Request.header_items
senthil.kumaran
python-checkins at python.org
Sun Apr 29 05:53:23 CEST 2012
http://hg.python.org/cpython/rev/9a1f525b98d9
changeset: 76610:9a1f525b98d9
branch: 2.7
parent: 76603:685c1db976c4
user: Senthil Kumaran <senthil at uthcode.com>
date: Sun Apr 29 11:52:59 2012 +0800
summary:
issue14427 - Document Request.get_header and Request.header_items
files:
Doc/library/urllib2.rst | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/Doc/library/urllib2.rst b/Doc/library/urllib2.rst
--- a/Doc/library/urllib2.rst
+++ b/Doc/library/urllib2.rst
@@ -380,6 +380,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