Issue 9845: Allow changing the method in urllib.request.Request
Created on 2010-09-13 13:07 by tarek, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| request_custom_method.patch | tarek, 2010-09-13 13:07 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg116301 - (view) | Author: Tarek Ziadé (tarek) * ![]() |
Date: 2010-09-13 13:07 | |
Right now you have to override Request or patch its get_method() method to be able to send HTTP requests where the method is not GET or POST. This is making some assumptions on what the users wants to do with the request. The way get_method guesses the method is good enough in most cases, but I think it would be good to let advanced developers provide their own method when they build a request. This would avoid unnecessary boiler-plate code to be able to customize the method. |
|||
| msg116302 - (view) | Author: Tarek Ziadé (tarek) * ![]() |
Date: 2010-09-13 13:09 | |
sorry - Removed the assignment (the name is not followed by *) |
|||
| msg116969 - (view) | Author: Éric Araujo (eric.araujo) * ![]() |
Date: 2010-09-20 20:36 | |
+1 on the idea and code patch. Needs test and doc update. |
|||
| msg154627 - (view) | Author: Éric Araujo (eric.araujo) * ![]() |
Date: 2012-02-29 13:09 | |
Python 3.3 supports this. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:06 | admin | set | github: 54054 |
| 2012-02-29 13:09:45 | eric.araujo | set | status: open -> closed versions: + Python 3.3, - Python 3.2 superseder: urllib2 requests history + HEAD support messages: + msg154627 resolution: duplicate |
| 2010-09-20 20:36:43 | eric.araujo | set | versions:
+ Python 3.2, - Python 3.3 nosy: + eric.araujo messages: + msg116969 stage: patch review |
| 2010-09-13 13:09:25 | tarek | set | assignee: orsenthil -> messages: + msg116302 |
| 2010-09-13 13:07:14 | tarek | create | |
