How to connect to a server using basic http auth thru sockets in python .I don't want to use urllib/urllib2 etc as my program does some low level socket I/O operations
Probably the easiest place to start is using
You'll have to do a lot more work than that if you need to interpret the returned response to pick out the HTML or auth-required headers, and handle redirects, errors, transfer-encoding and all that right. HTTP can be complex! Are you sure you need to use a low-level socket? |
|||
|
Look e.g. at urllib's sources, specifically the |
|||
|