Handle multiple cookies with httplib

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shagshag

    Handle multiple cookies with httplib

    hello,

    how can i set multiple cookies like :

    Set-Cookie: cookiename1=val ue1; expires=Tue, 31-Mar-09 11:17:43 GMT;
    path=/; domain=www.doma in.com
    Set-Cookie: cookiename2=val ue2; expires=Tue, 31-Mar-09 11:17:43 GMT;
    path=/; domain=www.doma in.com

    to a httplib.HTTPCon nection ?

    i used to do :

    connection = httplib.HTTPCon nection(host)
    connection.putr equest('GET', pathn)
    connection.puth eader('Cookie', cookie)

    also is there any way to view 'connection' in a readable format to
    understand how it is build after using many 'putheader' ?

    regards
Working...