micropython-lib/http.client/example_client.py

10 wiersze
195 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())