Bugs item #1528258, was opened at 2006-07-25 09:13
Message generated for change (Comment added) made by phr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1528258&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: paul rubin (phr)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib2 data argument

Initial Comment:
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.

----------------------------------------------------------------------

>Comment By: paul rubin (phr)
Date: 2006-07-25 09:13

Message:
Logged In: YES 
user_id=72053

Forgot to mention, this is Python 2.4.1.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1528258&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to