By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,590 Members | 1,021 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,590 IT Pros & Developers. It's quick & easy.

How to correctly set a cookie value in headers

P: 2
Maybe you will help me in this "simple" case:

Expand|Select|Wrap|Line Numbers
  1. request2 = urllib.request.Request(url)
  2. cj2 = http.cookiejar.CookieJar()
  3. urlOpener2 = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj2))
  4. url2 =
  5. allinfo2 =
Output of this script is on this image: My question is: How I can add new element to headers ?? something like that ('Set-Cookie',"server=2")
May 23 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.