Skip to content

Instantly share code, notes, and snippets.

@davidcomfort
Created December 13, 2015 22:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidcomfort/6963180b57b641a8274f to your computer and use it in GitHub Desktop.
Save davidcomfort/6963180b57b641a8274f to your computer and use it in GitHub Desktop.
s = requests.Session()
s.get('http://httpbin.org/cookies/set/sessioncookie/123456789')
r = s.get("http://httpbin.org/cookies")
print(r.text)
# '{"cookies": {"sessioncookie": "123456789"}}'
{
"cookies": {
"sessioncookie": "123456789"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment