import http.client conn = http.client.HTTPConnection("localhost", 8000) conn.request("GET", "/health") res = conn.getresponse() print(res.read().decode()) conn.close()