Created
December 26, 2012 07:07
-
-
Save mrluanma/4378611 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import logging | |
logging.basicConfig(level=logging.DEBUG) | |
s = requests.session() | |
# New connection to Httpbin.org. | |
s.get('http://httpbin.org/get') | |
# New connection to Github.com. | |
s.get('http://github.com/kennethreitz') | |
# Reuse old connection to Httpbin.org. | |
s.get('http://httpbin.org/ip') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment