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

Method add_command

mitmproxy/addonmanager.py:101–107  ·  view source on GitHub ↗

Add a command to mitmproxy. Unless you are generating commands programatically, this API should be avoided. Decorate your function with `@mitmproxy.command.command` instead.

(self, path: str, func: Callable)

Source from the content-addressed store, hash-verified

99 self.master.options.add_option(name, typespec, default, help, choices)
100
101 def add_command(self, path: str, func: Callable) -> None:
102 """Add a command to mitmproxy.
103
104 Unless you are generating commands programatically,
105 this API should be avoided. Decorate your function with `@mitmproxy.command.command` instead.
106 """
107 self.master.commands.add(path, func)
108
109
110def traverse(chain):

Callers 2

test_loaderFunction · 0.95

Calls 1

addMethod · 0.45

Tested by 2

test_loaderFunction · 0.76