diff -r f89b42c35ceb Doc/library/http.client.rst --- a/Doc/library/http.client.rst Fri Jun 10 16:38:38 2011 +0200 +++ b/Doc/library/http.client.rst Fri Jun 10 21:21:55 2011 +0200 @@ -497,7 +497,17 @@ .. method:: HTTPResponse.read([amt]) - Reads and returns the response body, or up to the next *amt* bytes. + Reads and returns the response body, or up to the next *amt* bytes (*amt* is amount). + + With *amt* parameter, you can read data chunk by chunk, example:: + + >>> import http.client + >>> conn = http.client.HTTPConnection("www.python.org") + >>> conn.request("GET", url="/index.html") + >>> r1 = conn.getresponse() + >>> while not r1.closed: + ... print(r1.read(200)) + b'