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

Function runCommand

web/src/js/utils.ts:124–136  ·  view source on GitHub ↗
(
    command: string,
    ...args: string[]
)

Source from the content-addressed store, hash-verified

122 });
123
124export async function runCommand(
125 command: string,
126 ...args: string[]
127): Promise<any> {
128 const response = await fetchApi(`/commands/${command}`, {
129 method: "POST",
130 headers: {
131 "Content-Type": "application/json",
132 },
133 body: JSON.stringify({ arguments: args }),
134 });
135 return await response.json();
136}
137
138// deep comparison of two json objects (dicts). arrays are handeled as a single value.
139// return: json object including only the changed keys value pairs.

Callers 4

copyFunction · 0.90
CommandBarFunction · 0.90
onKeyDownFunction · 0.90
onKeyDownFunction · 0.90

Calls 2

fetchApiFunction · 0.85
jsonMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…