HTTP GET request with basic authorization?

Christopher J. Bottaro cjbottaro at alumni.cs.utexas.edu
Sat Jan 1 23:06:14 EST 2005


How do I do this using httplib.HTTPConnection and
httplib.HTTPConnection.request()?  The library reference only gives a
simple GET example with no header stuff.  I tried this, but it didn't work:
conn.request("GET", "/somepage.html", None, {"AUTHORIZATION": "Basic
username:password"})

Thanks for the help.

P.S.  I know nothing about HTTP, I'm just piecing this stuff together from
examples on the internet, please be gentle with your responses.




More information about the Python-list mailing list