Created
January 12, 2016 15:32
-
-
Save Torxed/3e1d12ba00dd9358c210 to your computer and use it in GitHub Desktop.
A example where `Keep-Alive` is used in the HTTP/1.X protocol and Python
This file contains hidden or 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
from urllib3 import HTTPConnectionPool | |
pool = HTTPConnectionPool('www.google.se', maxsize=1) | |
ret = pool.request('GET', '/') | |
print(ret.status) | |
ret_two = pool.request('GET', '/search', fields={'q' : 'python'}) | |
print(ret_two) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment