Message29274
urllib2.Request takes constructor args (url, data,
headers, ...) where data and headers are optional.
data is described as a string which, if supplied,
causes urlopen to process the request as a POST rather
than a GET. And there's no way to set headers without
passing a value for data. So if you want to send a GET
with special headers, the docs leave you scratching
your head.
The solution is to pass None instead of a string for
data. The doc should say that.
In general the urllib2 docs are somewhat dependent on
the urllib docs. Some refactoring would be good. |
|
Date |
User |
Action |
Args |
2007-08-23 14:41:33 | admin | link | issue1528258 messages |
2007-08-23 14:41:33 | admin | create | |
|