Add post handler
This commit is contained in:
parent
070a7579ed
commit
8add8af36c
1 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,10 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
|
||||||
self.wfile.write(bytes(message, "utf8"))
|
self.wfile.write(bytes(message, "utf8"))
|
||||||
return
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue