micropython-lib/http.client/test_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())