@scalar/api-client
Version:
the open source API testing client
31 lines • 1.44 kB
TypeScript
import { type XScalarCookie } from '@scalar/workspace-store/schemas/extensions/general/x-scalar-cookies';
/**
* Generate a cookie header from the cookie params
*/
export declare const getCookieHeader: (cookieParams: XScalarCookie[], originalCookieHeader: string | undefined) => string;
/**
* Build out the cookies header taking in global, param and security scheme cookies
*/
export declare const buildRequestCookieHeader: ({ paramCookies, globalCookies, env, path, originalCookieHeader, url, useCustomCookieHeader, }: {
/** Parsed/replaced cookies from the parameters and security schemes */
paramCookies: XScalarCookie[];
/** Raw global cookies from the workspace/document */
globalCookies: XScalarCookie[];
/** Environment variables flattened into a key-value object */
env: Record<string, string>;
/** The path of the request used to filter global cookies by path */
path: string;
/** Cookie header that previously exists from the spec OR from the user */
originalCookieHeader: string | undefined;
/** The url of the request used to filter global cookies by domain */
url: string;
/**
* If we are running in Electron or using the proxy, we need to add a custom header
* that's then forwarded as a `Cookie` header.
*/
useCustomCookieHeader: boolean;
}) => null | {
name: string;
value: string;
};
//# sourceMappingURL=build-request-cookie-header.d.ts.map