usr bin env python import httplib import urllib conn httplib HTTPConne

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/env python
import httplib
import urllib
conn = httplib.HTTPConnection('www.google.com')
headers = {'Cache-Control': 'no-cache',}
conn.request('GET', '/?q=jython', headers=headers)
r1 = conn.getresponse()
print r1.status, r1.reason
print r1.read()