Title: Add support for other HTTP methods in urllib.request
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.3
Status: closed Resolution: duplicate
Dependencies: Superseder: urllib2 requests history + HEAD support
View: 1673007
Assigned To: Nosy List: ezio.melotti, poke
Priority: normal Keywords: patch

Created on 2011-10-09 22:26 by poke, last changed 2011-10-09 22:43 by poke. This issue is now closed.

File name Uploaded Description Edit
urllib.patch poke, 2011-10-09 22:26 Patch for requested feature
Messages (3)
msg145283 - (view) Author: Patrick Westerhoff (poke) Date: 2011-10-09 22:26

I would like to request the support of other HTTP methods (other than GET and POST) in urllib.request. While it’s actually simple enough to override the Request class to add such a possibility, I think it is far too simple to leave it out of the standard library.

I’ve attached a patch that adds the functionality with a simple `method` property. The `get_method` function then simply looks if a custom method was entered, and otherwise falls back to the default behaviour.

Thanks a lot!

Patrick Westerhoff

Btw. Being a Git user, I hope the patch is actually useful ;)
msg145284 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-10-09 22:36
This is a duplicate of #1673007, and it also has the same patch you wrote.
msg145285 - (view) Author: Patrick Westerhoff (poke) Date: 2011-10-09 22:43
Oh sorry, I didn’t see that one. :)
Date User Action Args
2011-10-09 22:43:22pokesetmessages: + msg145285
2011-10-09 22:36:59ezio.melottisetstatus: open -> closed

superseder: urllib2 requests history + HEAD support
versions: - Python 3.2, Python 3.4
nosy: + ezio.melotti

messages: + msg145284
resolution: duplicate
stage: resolved
2011-10-09 22:26:16pokecreate