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

Function RequestLine

web/src/js/components/FlowView/HttpMessages.tsx:22–66  ·  view source on GitHub ↗
({ flow }: RequestLineProps)

Source from the content-addressed store, hash-verified

20};
21
22function RequestLine({ flow }: RequestLineProps) {
23 const dispatch = useAppDispatch();
24
25 return (
26 <div className="first-line request-line">
27 <div>
28 <ValidateEditor
29 content={flow.request.method}
30 onEditDone={(method) =>
31 dispatch(
32 flowActions.update(flow, { request: { method } }),
33 )
34 }
35 isValid={(method) => method.length > 0}
36 selectAllOnClick={true}
37 />
38 &nbsp;
39 <ValidateEditor
40 content={RequestUtils.pretty_url(flow.request)}
41 onEditDone={(url) =>
42 dispatch(
43 flowActions.update(flow, {
44 request: { path: "", ...parseUrl(url) },
45 }),
46 )
47 }
48 isValid={(url) => !!parseUrl(url)?.host}
49 />
50 &nbsp;
51 <ValidateEditor
52 content={flow.request.http_version}
53 onEditDone={(http_version) =>
54 dispatch(
55 flowActions.update(flow, {
56 request: { http_version },
57 }),
58 )
59 }
60 isValid={isValidHttpVersion}
61 selectAllOnClick={true}
62 />
63 </div>
64 </div>
65 );
66}
67
68type ResponseLineProps = {
69 flow: HTTPFlow & { response: HTTPResponse };

Callers

nothing calls this directly

Calls 5

useAppDispatchFunction · 0.90
parseUrlFunction · 0.90
dispatchFunction · 0.85
updateMethod · 0.45
pretty_urlMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…