Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a41c9426
Commit
a41c9426
authored
Oct 20, 2011
by
Senthil Kumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc improvements suggested by Éric Araujo for the new 'HEAD' Request feature.
parent
c6b4ef10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
Doc/library/urllib.request.rst
Doc/library/urllib.request.rst
+6
-6
Doc/whatsnew/3.3.rst
Doc/whatsnew/3.3.rst
+1
-1
No files found.
Doc/library/urllib.request.rst
View file @
a41c9426
...
...
@@ -177,7 +177,7 @@ The following classes are provided:
*method* should be a string that indicates the HTTP request method that
will be used (e.g. ``'HEAD'``). Its value is stored in the
:attr:`
Request.method` attribute and is used by :meth:`Request.
get_method()`.
:attr:`
~Request.method` attribute and is used by :meth:`
get_method()`.
.. versionchanged:: 3.3
:attr:`Request.method` argument is added to the Request class.
...
...
@@ -379,11 +379,11 @@ request.
.. attribute:: Request.method
The HTTP request method to use. This value is used by
:meth:`Request.get_method` to override the computed HTTP request
method that would otherwise be returned. This attribute is
initialized with
the value of the *method* argument passed to the constructor.
:meth:`
~
Request.get_method` to override the computed HTTP request
method that would otherwise be returned. This attribute is
initialized with
the value of the *method* argument passed to the constructor.
..versionadded:: 3.3
..
versionadded:: 3.3
.. method:: Request.add_data(data)
...
...
@@ -400,7 +400,7 @@ request.
This is only meaningful for HTTP requests.
.. versionchanged:: 3.3
get_method now looks at the value of :attr:`Request.method`
first
.
get_method now looks at the value of :attr:`Request.method`.
.. method:: Request.has_data()
...
...
Doc/whatsnew/3.3.rst
View file @
a41c9426
...
...
@@ -484,7 +484,7 @@ urllib
The :class:`~urllib.request.Request` class, now accepts a *method* argument
used by :meth:`~urllib.request.Request.get_method` to determine what HTTP method
should be used. For example, this will send a
n
``'HEAD'`` request::
should be used. For example, this will send a ``'HEAD'`` request::
>>> urlopen(Request('http://www.python.org', method='HEAD'))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment