import json


class MyRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):

    def do_POST(self):
        content_length = int(self.headers.getheader('content-length'))
How to receive POST data in python when using XMLHttpRequest()