micropython-lib/unix-ffi/http.client/example_client.py

10 wiersze
196 B
Python

from http.client import HTTPConnection
conn = HTTPConnection("localhost")
# conn = HTTPConnection("python.org")
conn.request("GET", "/")
resp = conn.getresponse()
print(resp)
print(resp.read())