Skip to content

Instantly share code, notes, and snippets.

Created December 17, 2012 09:08
Show Gist options
  • Save anonymous/4316909 to your computer and use it in GitHub Desktop.
Save anonymous/4316909 to your computer and use it in GitHub Desktop.
import requests
r = requests.get("http://httpbin.org/cookies/set?k1=v1&k2=v2")
print r.cookies
# you can get a dict that stores everything of the CookieJar object
cookies = r.cookies.get_dict()
r = requests.get("http://httpbin.org/cookies", cookies=cookies)
print r.content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment