diff -r c91ed8dacf38 Doc/library/urllib.request.rst --- a/Doc/library/urllib.request.rst Sat Apr 28 11:19:59 2012 +0200 +++ b/Doc/library/urllib.request.rst Sat Apr 28 21:52:01 2012 +0200 @@ -441,6 +441,14 @@ request. Return whether the instance has the named header (checks both regular and unredirected). +.. method:: Request.get_header(header_name, default=None) + + Return a value of given header if present otherwise return default value. + +.. method:: Request.header_items() + + Return a list of tuples (header name, header value). The list contains both + regular and unredirected headers. .. method:: Request.get_full_url() @@ -1410,4 +1418,3 @@ typical response object is an addinfourl method and that returns headers and a ``geturl()`` method that returns the url. Functions defined by this module are used internally by the :mod:`urllib.request` module. -