MCPcopy
hub / github.com/osrg/gobgp / _send_json

Method _send_json

tools/grpc/python/flowspec_mitigation.py:281–287  ·  view source on GitHub ↗
(self, code, data)

Source from the content-addressed store, hash-verified

279 stub = None
280
281 def _send_json(self, code, data):
282 body = json.dumps(data).encode()
283 self.send_response(code)
284 self.send_header("Content-Type", "application/json")
285 self.send_header("Content-Length", str(len(body)))
286 self.end_headers()
287 self.wfile.write(body)
288
289 def _read_body(self):
290 length = int(self.headers.get("Content-Length", 0))

Callers 2

do_POSTMethod · 0.95
do_GETMethod · 0.95

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected