(url: string, format: Format, userAgent = browserUserAgent)
| 80 | } |
| 81 | |
| 82 | const request = (url: string, format: Format, userAgent = browserUserAgent) => |
| 83 | HttpClientRequest.get(url).pipe(HttpClientRequest.setHeaders(headers(format, userAgent))) |
| 84 | |
| 85 | const assertHttpUrl = (url: URL) => { |
| 86 | if (url.protocol !== "http:" && url.protocol !== "https:") throw new Error("URL must use http:// or https://") |