UNPKG

@sap-cloud-sdk/core

Version:
12 lines 1.09 kB
import { Destination, DestinationNameAndJwt } from '../connectivity/scp-cf/destination'; import { HttpRequestConfig } from './http-client-types'; /** * Get CSRF token and cookies for a destination and request configuration. The CSRF token and cookies will be retrieved based on the URL of the destination and the custom configuration given by the `requestConfig`. * If there is a relative url in the `requestConfig` it will be appended to the destination's URL, an absolute URL overwrites the destination related URL. * @param destination - The destination to get the headers from * @param requestConfig - An http request configuration containing additional information about the request, like URL or headers * @returns A promise to an object containing the CSRF related headers */ export declare function buildCsrfHeaders<T extends HttpRequestConfig>(destination: Destination | DestinationNameAndJwt, requestConfig: Partial<T>): Promise<Record<string, any>>; export declare function buildCsrfFetchHeaders(headers: any): Record<string, any>; //# sourceMappingURL=csrf-token-header.d.ts.map