(url: string)
| 181 | } |
| 182 | |
| 183 | function getHttpSuggestedName(url: string): string { |
| 184 | try { |
| 185 | const parsedUrl = new URL(url) |
| 186 | const path |
| 187 | = parsedUrl.pathname === '/' ? parsedUrl.hostname : parsedUrl.pathname |
| 188 | |
| 189 | return `GET ${path}` |
| 190 | } |
| 191 | catch { |
| 192 | return 'GET request' |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | async function getErrorMessage(response: Response): Promise<string> { |
| 197 | try { |
no outgoing calls
no test coverage detected