MCPcopy
hub / github.com/axios/axios / assertValidHttpProtocolURL

Function assertValidHttpProtocolURL

lib/core/buildFullPath.js:22–30  ·  view source on GitHub ↗
(url, config)

Source from the content-addressed store, hash-verified

20}
21
22function assertValidHttpProtocolURL(url, config) {
23 if (typeof url === 'string' && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) {
24 throw new AxiosError(
25 'Invalid URL: missing "//" after protocol',
26 AxiosError.ERR_INVALID_URL,
27 config
28 );
29 }
30}
31
32/**
33 * Creates a new URL by combining the baseURL with the requestedURL,

Callers 1

buildFullPathFunction · 0.85

Calls 1

Tested by

no test coverage detected