http request doesn't work!
bignose-hates-spam at and-benfinney-does-too.id.au
Fri Mar 26 05:51:13 CET 2004
bart3rNOSPAM at clinicdesignNOSPAM.com.au wrote:
> Could someone please let me know what i'm doing wrong here:
Using the obsolete httplib.HTTP class.
Try using HTTPConnection and HTTPResponse objects:
>>> import httplib
>>> webhost = 'adsl.internode.on.net'
>>> pagepath = '/htm/un-metered-sites-ip-list.htm'
>>> http_conn = httplib.HTTPConnection( webhost )
>>> http_conn.request( 'GET', pagepath )
>>> http_resp = http_conn.getresponse()
>>> ( http_resp.status, http_resp.reason )
\ "I stayed up all night playing poker with tarot cards. I got a |
`\ full house and four people died." -- Steven Wright |
Ben Finney <http://bignose.squidly.org/>
More information about the Python-list