( body: string, maxSize: number, )
| 114 | } |
| 115 | |
| 116 | export function truncateBody( |
| 117 | body: string, |
| 118 | maxSize: number, |
| 119 | ): { text: string; truncated: boolean } { |
| 120 | if (body.length <= maxSize) { |
| 121 | return { text: body, truncated: false }; |
| 122 | } |
| 123 | return { text: body.slice(0, maxSize), truncated: true }; |
| 124 | } |
| 125 | |
| 126 | export function buildHarRequest( |
| 127 | input: HttpRequestInput, |
no outgoing calls
no test coverage detected