In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] wrote:

>I would like to
>hard code the cookie in the code so it works every time:   
>
>i.e. cookie = 'auth=buster%3A12345678901234567890exZ9rzMqgtxa5A'.  
>
>    conn=httplib.HTTPConnection(WP_SERVER)
>    conn.request('GET',WP_PATH % uservalue)    

According to <http://docs.python.org/lib/httpconnection-objects.html>, 
you can pass additional "body" and "headers" args to 
HTTPConnection.request. How about trying something like this in place of 
the last line above:

    Headers = {"Cookie" : 
"auth=buster%3A12345678901234567890exZ9rzMqgtxa5A"}
    conn.request('GET',WP_PATH % uservalue, None, Headers)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to