(url, config)
| 43 | } |
| 44 | |
| 45 | function assertValidHttpProtocolURL(url, config) { |
| 46 | if (typeof url === 'string') { |
| 47 | const normalizedURL = normalizeURLForProtocolCheck(url); |
| 48 | if (malformedHttpProtocol.test(normalizedURL)) { |
| 49 | throw new AxiosError( |
| 50 | `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`, |
| 51 | AxiosError.ERR_INVALID_URL, |
| 52 | config |
| 53 | ); |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Creates a new URL by combining the baseURL with the requestedURL, |
no test coverage detected