Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 17 lines (13 sloc) 371 Bytes
#!/usr/bin/env python3
#
# An HTTP client that does not check that the content of the response has at
# least Content-Length bytes.
#
import requests
import sys
response = requests.get('http://localhost:8080/')
if not response.ok:
sys.exit('error: HTTP {}'.format(response.status_code))
print(response.headers)
print(response.content)
print(len(response.content))