({ flow }: RequestLineProps)
| 20 | }; |
| 21 | |
| 22 | function 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 | |
| 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 | |
| 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 | |
| 68 | type ResponseLineProps = { |
| 69 | flow: HTTPFlow & { response: HTTPResponse }; |
nothing calls this directly
no test coverage detected
searching dependent graphs…