def do_POST(self, serv):
    buf = serv.rfile.read()
    try:
        obj = json.loads(buf)
    except:
        self.send_error(401)
        return
def do_POST(self, serv):
    buf = serv.rfile.read()
    try:
        obj = json.loads(buf)
    except:
        self.send_error(401)
        return