HTTP GET request with basic authorization?

Discussion in 'Python' started by Christopher J. Bottaro, Jan 2, 2005.

  1. 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.
    Christopher J. Bottaro, Jan 2, 2005
    #1
    1. Advertising

  2. Christopher J. Bottaro

    Fuzzyman Guest

    Fuzzyman, Jan 4, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonas Galvez
    Replies:
    0
    Views:
    575
    Jonas Galvez
    Jan 2, 2005
  2. John J. Lee
    Replies:
    1
    Views:
    857
    John Reese
    Jan 4, 2005
  3. SeanRW
    Replies:
    1
    Views:
    350
    Dominick Baier [DevelopMentor]
    May 25, 2006
  4. Nacho Nachev
    Replies:
    2
    Views:
    879
  5. scottny07
    Replies:
    1
    Views:
    199
    Peter Scott
    Mar 30, 2007
Loading...

Share This Page