examples/http_client: Use read() instead of readall().

pull/2632/head
Paul Sokolovsky 2016-11-14 00:24:45 +03:00
rodzic 59a1201da9
commit 00a9590e3a
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -19,7 +19,7 @@ def main(use_stream=False):
# directly, but the line below is needed for CPython.
s = s.makefile("rwb", 0)
s.write(b"GET / HTTP/1.0\r\n\r\n")
print(s.readall())
print(s.read())
else:
s.send(b"GET / HTTP/1.0\r\n\r\n")
print(s.recv(4096))