Added the "Host" header to the "GET" example.

This closes SF bug #457100.
This commit is contained in:
Fred Drake 2001-09-01 02:35:23 +00:00
parent ae45714ed3
commit 481cf2c064
1 changed files with 1 additions and 0 deletions

View File

@ -121,6 +121,7 @@ Here is an example session that uses the \samp{GET} method:
>>> h.putrequest('GET', '/index.html')
>>> h.putheader('Accept', 'text/html')
>>> h.putheader('Accept', 'text/plain')
>>> h.putheader('Host', 'www.cwi.nl')
>>> h.endheaders()
>>> errcode, errmsg, headers = h.getreply()
>>> print errcode # Should be 200