MCPcopy
hub / github.com/mitmproxy/mitmproxy / ExportButton

Function ExportButton

web/src/js/components/Header/FlowMenu.tsx:204–238  ·  view source on GitHub ↗
({ flow }: { flow: Flow })

Source from the content-addressed store, hash-verified

202}
203
204function ExportButton({ flow }: { flow: Flow }) {
205 const hasSingleFlowSelected = useAppSelector(
206 (state) => state.flows.selected.length === 1,
207 );
208 return (
209 <Dropdown
210 className=""
211 text={
212 <Button
213 title="Export flow."
214 icon="fa-clone"
215 onClick={() => 1}
216 disabled={flow.type !== "http" || !hasSingleFlowSelected}
217 >
218 Export▾
219 </Button>
220 }
221 options={{ placement: "bottom-start" }}
222 >
223 <MenuItem onClick={() => copy(flow, "raw_request")}>
224 Copy raw request
225 </MenuItem>
226 <MenuItem onClick={() => copy(flow, "raw_response")}>
227 Copy raw response
228 </MenuItem>
229 <MenuItem onClick={() => copy(flow, "raw")}>
230 Copy raw request and response
231 </MenuItem>
232 <MenuItem onClick={() => copy(flow, "curl")}>Copy as cURL</MenuItem>
233 <MenuItem onClick={() => copy(flow, "httpie")}>
234 Copy as HTTPie
235 </MenuItem>
236 </Dropdown>
237 );
238}
239
240const markers = {
241 ":red_circle:": "🔴",

Callers

nothing calls this directly

Calls 1

copyFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…