(url?: string)
| 79 | } |
| 80 | |
| 81 | function getUrlHost(url?: string): string | undefined { |
| 82 | if (!url) { |
| 83 | return undefined |
| 84 | } |
| 85 | |
| 86 | try { |
| 87 | return new URL(url).hostname |
| 88 | } |
| 89 | catch { |
| 90 | return undefined |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | function getHttpNameFromUrl(url?: string, method = 'GET'): string | undefined { |
| 95 | if (!url) { |
no outgoing calls
no test coverage detected