mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
27 lines
693 B
Python
27 lines
693 B
Python
##
|
|
## Copyright (c) Microsoft Corporation. All rights reserved.
|
|
## Licensed under the MIT License.
|
|
##
|
|
|
|
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
|
|
|
|
|
|
class S(BaseHTTPRequestHandler):
|
|
def _set_headers(self):
|
|
self.send_response(200)
|
|
self.send_header('Content-type', 'text/html')
|
|
self.end_headers()
|
|
|
|
def do_POST(self):
|
|
self._set_headers()
|
|
print "In post method"
|
|
print self.rfile.read(int(self.headers['Content-Length']))
|
|
self.send_response(200)
|
|
self.end_headers()
|
|
|
|
|
|
server_address = ('', 80)
|
|
httpd = HTTPServer(server_address, S)
|
|
print 'Starting httpd...'
|
|
httpd.serve_forever()
|