I like urllib2
for automated routine operations, like cookie handling (with cookielib.CookieJar
) or redirects processing. But i also like httplib
for the low-level control that programmer have. For example, with httplib
i can control for the order of HTTP headers but with urllib2
i cannot. Also, with httplib
i can easily set Content-Type
header to whatever i need and send, but not with urllib2
- it takes too much control over headers for itself and may rewrite my headers by its internal logic.
I would stay with httplib
, but cookies processing with httplib
is not very easy task. I can't connect it to cookielib
and cookies parsing and processing is not so simple task to be done in 20 minutes with developing my own cookie-handling class.
Is there any cookies-processing solution standard for httplib
?
Is there a way to control over order of headers to be sent with urllib2
and turn off its intellect that may add new headers?