(response: any)
| 967 | } |
| 968 | |
| 969 | const readResponseBody = async (response: any): Promise<string> => { |
| 970 | if (response && typeof response.text === "function") { |
| 971 | return await response.text().catch(() => "[read text failed]") |
| 972 | } |
| 973 | if (response && typeof response.json === "function") { |
| 974 | return await response |
| 975 | .json() |
| 976 | .then((data: unknown) => JSON.stringify(data)) |
| 977 | .catch(() => "[read json failed]") |
| 978 | } |
| 979 | return "[no body reader]" |
| 980 | } |
| 981 | |
| 982 | const responseMeta = (response: any) => { |
| 983 | const headers = |
no test coverage detected