(line: string, json: Record<string, unknown> | null)
| 339 | } |
| 340 | |
| 341 | function readHeaders(line: string, json: Record<string, unknown> | null): string | undefined { |
| 342 | if (json) { |
| 343 | const headers = json.headers ?? json.requestHeaders ?? json.responseHeaders; |
| 344 | if (headers !== undefined) return stringifyValue(headers); |
| 345 | } |
| 346 | const match = /\bheaders?["'=: ]+(\{.*\})/i.exec(line); |
| 347 | return match?.[1]?.trim(); |
| 348 | } |
| 349 | |
| 350 | function readBody( |
| 351 | line: string, |
no test coverage detected
searching dependent graphs…