(body)
| 76914 | } else { |
| 76915 | reject(new RestError(`Error reading response as text: ${e3.message}`, { |
| 76916 | code: RestError.PARSE_ERROR |
| 76917 | })); |
| 76918 | } |
| 76919 | }); |
| 76920 | }); |
| 76921 | } |
| 76922 | function getBodyLength2(body) { |
| 76923 | if (!body) { |
| 76924 | return 0; |
| 76925 | } else if (Buffer.isBuffer(body)) { |
| 76926 | return body.length; |
| 76927 | } else if (isReadableStream2(body)) { |
| 76928 | return null; |
| 76929 | } else if (isArrayBuffer2(body)) { |
| 76930 | return body.byteLength; |
| 76931 | } else if (typeof body === "string") { |
| 76932 | return Buffer.from(body).length; |
| 76933 | } else { |
no test coverage detected
searching dependent graphs…