MCPcopy Index your code
hub / github.com/raiden-network/raiden / do_POST

Method do_POST

tools/dummy_resolver_server.py:32–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30def serve():
31 class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
32 def do_POST(self):
33 try:
34 content_len = int(self.headers.get("Content-Length"))
35 body = self.rfile.read(content_len)
36
37 preimage = resolve(json.loads(body.decode("utf8")))
38 if preimage is None:
39 self.send_response(404)
40 self.end_headers()
41 else:
42 response = to_bytes(text=json.dumps(preimage))
43 self.send_response(200)
44 self.end_headers()
45 self.wfile.write(response)
46 except BaseException:
47 self.send_response(400)
48 self.end_headers()
49
50 # TODO: accept port as runtime parameters to allow parallel execution
51 # of multiple resolvers.

Callers

nothing calls this directly

Calls 2

resolveFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected