From 500a82267dd2a48ee36ba817c1690aac9609bb39 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 31 May 2014 15:17:58 +0300 Subject: [PATCH] http.client: Add example. --- http.client/test_client.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 http.client/test_client.py diff --git a/http.client/test_client.py b/http.client/test_client.py new file mode 100644 index 00000000..00c00aa5 --- /dev/null +++ b/http.client/test_client.py @@ -0,0 +1,9 @@ +from http.client import HTTPConnection + + +conn = HTTPConnection("localhost") +#conn = HTTPConnection("micropython.org") +conn.request("GET", "/") +resp = conn.getresponse() +print(resp) +print(resp.read())