[Tutor] Passing headers with httplib

Ray Parrish crp at cmc.net
Fri Apr 16 06:06:04 CEST 2010


I am trying to figure out how to send cookie data with an httplib 
request command. Here is what the doc says -

request(      method, url[, body[, headers]])
    This will send a request to the server using the HTTP request method 
method and the selector url. If the body argument is present, it should 
be a string of data to send after the headers are finished. The header 
Content-Length is automatically set to the correct value. The headers 
argument should be a mapping of extra HTTP headers to send with the 

My question is how do I formulate a "mapping" of a header for a few 
cookies? Here are the cookies I would like to send with the request -

TVGID=029690D849714243A9DDEA34652CA804; Provider=Broadcast; 
s_cc=true; s_sq=%5B%5BB%5D%5D; wtpgcnt=1; 

Thanks for any help you can be, Ray Parrish

Linux dpkg Software Report script set..
Ray's Links, a variety of links to usefull things, and articles by Ray.
Writings of "The" Schizophrenic, what it's like to be a schizo, and other
things, including my poetry.

More information about the Tutor mailing list