MCPcopy
hub / github.com/mitmproxy/mitmproxy / add_flows

Method add_flows

mitmproxy/addons/serverplayback.py:147–155  ·  view source on GitHub ↗

Add responses from flows to server replay list.

(self, flows: Sequence[flow.Flow])

Source from the content-addressed store, hash-verified

145
146 @command.command("replay.server.add")
147 def add_flows(self, flows: Sequence[flow.Flow]) -> None:
148 """
149 Add responses from flows to server replay list.
150 """
151 for f in flows:
152 if isinstance(f, http.HTTPFlow):
153 lst = self.flowmap.setdefault(self._hash(f), [])
154 lst.append(f)
155 ctx.master.addons.trigger(hooks.UpdateHook([]))
156
157 @command.command("replay.server.file")
158 def load_file(self, path: mitmproxy.types.Path) -> None:

Callers 2

test_add_flowsFunction · 0.95
load_flowsMethod · 0.95

Calls 4

_hashMethod · 0.95
triggerMethod · 0.80
setdefaultMethod · 0.45
appendMethod · 0.45

Tested by 1

test_add_flowsFunction · 0.76