Suggestion: "Completing" HTTP support in Python.
Robb Shecter
shecter at darmstadt.gmd.de
Fri Jun 16 08:50:37 EDT 2000
Edward Jason Riedy wrote:
> And Oleg Broytmann writes:
> -
> - GET: ...
> - POST: ...
>
> You only answered half of his request. The other half is _not_
> supported by urllib: adding HTTP headers.
Correct. There were a few things I mentioned in my post that aren't handled in Python.
>
>
> I believe he's looking for a libwww-perl equivalent in Python.
> I am, too. LWP is one major reason I still write Perl code on
> a daily basis...
Interesting. Thanks for the link. We absolutely should borrow from another language's model if it's been shown to work, etc.
I'll take another look at LWP, but I can imagine the library being even easier to use than the sample code you gave. Here's an
example from an HttpConnector class I wrote in Java:
connector = new HttpConnector();
connector.setURL( aURL );
connector.addParameter( "username", "robb" );
result = connector.post(10); // Specify a 10-second timeout
// ...and later we could do...
connector.clearParameters();
result2 = connector.get();
- Robb
More information about the Python-list
mailing list