blob: 5ef7f9b955e8bd08fe49b91bb2de39bd53eb46eb (
plain)
1
2
3
4
5
6
7
8
9
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()
|