(harRequest: Entry)
| 22 | }; |
| 23 | |
| 24 | const parseRequestBody = (harRequest: Entry): JSONType => { |
| 25 | const { mimeType, text } = harRequest.request.postData || {}; |
| 26 | if (mimeType?.startsWith(APPLICATION_JSON)) return parseJSON(text); |
| 27 | else if (mimeType?.startsWith(APPLICATION_X_WWW_FORM_URLENCODED) && text) |
| 28 | return qs.parse(text) as JSONType; |
| 29 | return null; |
| 30 | }; |
| 31 | |
| 32 | function createLeaf({ harRequest, responseBody, options }: Params): Leaf { |
| 33 | const { enableMoreInfo } = options; |
no test coverage detected