UNPKG

@esri/arcgis-rest-request

Version:

Common methods and utilities for @esri/arcgis-rest-js packages.

36 lines (35 loc) 1.2 kB
/** * Send a no-cors request to the passed uri. This is used to pick up * a cookie from a 3rd party server to meet a requirement of some authentication * flows. * @param url * @returns */ export declare function sendNoCorsRequest(url: string): Promise<void>; /** * Allow us to get the no-cors domains that are registered * so we can pass them into the identity manager * @returns */ export declare function getRegisteredNoCorsDomains(): string[]; /** * Register the domains that are allowed to be used in no-cors requests * This is called by `request` when the portal/self response is intercepted * and the `.authorizedCrossOriginNoCorsDomains` property is set. * @param authorizedCrossOriginNoCorsDomains */ export declare function registerNoCorsDomains(authorizedCrossOriginNoCorsDomains: string[]): void; /** * Is the origin of the passed url in the no-cors domains list? * @param url * @returns */ export declare function isNoCorsDomain(url: string): boolean; /** * Is the origin of the passed url in the no-cors domains list * and do we need to send a no-cors request? * * @param url * @returns */ export declare function isNoCorsRequestRequired(url: string): boolean;