aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..5ef7f9b
--- /dev/null
+++ b/main.py
@@ -0,0 +1,10 @@
+from http.server import SimpleHTTPRequestHandler, HTTPServer
+
+class fuwuqi(SimpleHTTPRequestHandler):
+ def do_POST(self):
+ self.send_response(200)
+ self.send_header('Content-type', 'text/html')
+ self.end_headers()
+ self.wfile.write('hi!'.encode('utf-8'))
+
+HTTPServer(('localhost', 4200), fuwuqi).serve_forever()