Add post handler

This commit is contained in:
Nico Schottelius 2016-09-16 17:26:08 +02:00
parent 070a7579ed
commit 8add8af36c
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,10 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
self.wfile.write(bytes(message, "utf8"))
return
def do_POST(self):
length = int(self.headers['Content-Length'])
post_data = urllib.parse.parse_qs(self.rfile.read(length).decode('utf-8'))
print(post_data)