HTTP GET request with basic authorization?

  • Thread starter Christopher J. Bottaro
  • Start date
C

Christopher J. Bottaro

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top