MCPcopy Index your code
hub / github.com/mitmproxy/mitmproxy / post

Method post

mitmproxy/tools/web/app.py:779–795  ·  view source on GitHub ↗
(self, cmd: str)

Source from the content-addressed store, hash-verified

777
778class ExecuteCommand(RequestHandler):
779 def post(self, cmd: str):
780 # TODO: We should parse query strings here, this API is painful.
781 try:
782 args = self.json["arguments"]
783 except APIError:
784 args = []
785 try:
786 result = self.master.commands.call_strings(cmd, args)
787 except Exception as e:
788 self.write({"error": str(e)})
789 else:
790 self.write(
791 {
792 "value": result,
793 # "type": command.typename(type(result)) if result is not None else "none"
794 }
795 )
796
797
798class Events(RequestHandler):

Callers

nothing calls this directly

Calls 2

call_stringsMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected