MapLayerFetchRequest Type Alias

MapLayerFetchRequest = (request: MapLayerRequest) => Promise<Response>

Sends a MapLayerRequest onward: the request is first offered to the MapLayerFetchHandlers registered after the calling one, which may modify it further or decline; once the pipeline is exhausted we issue it with the site's standard behavior (origin-trust checks, timeouts) and resolve with the response. The request sent is the one passed: its searchParams and headers go on the wire, while the target (origin and path) is always that of the request the handler received. May be called one or more times by a handler (e.g. to retry with a refreshed token).

Every send is a credentialed request, because only the handler knows whether a value it injected is a secret: redirects are refused while restrictCredentialsToTrustedOrigins is enabled (so injected values cannot silently reach an unlisted origin through a redirect), and an NTLM/Negotiate 401 challenge is never answered with browser credentials (SSO). A handler that does not manage a request must therefore not send it but decline it (return undefined), so the request keeps its default behavior in full — e.g. layers served by Windows-Authentication-protected services are not degraded by a handler serving another format. We keep protecting the credentials we supply ourselves (settings-derived basic auth, browser SSO identity) on every send.

Defined in

Last Updated: 03 December, 2026