@scalar/api-client
Version:
the open source API testing client
18 lines • 670 B
TypeScript
/**
* Parse a Set-Cookie header value into name and value.
*
* Set-Cookie headers have the format: name=value; attribute1; attribute2=value2
* We extract just the cookie name and value (the part before the first semicolon).
*
* @param setCookieValue - The full Set-Cookie header value
* @returns Object with cookie name and value, or null if parsing fails
*
* @example
* parseSetCookie('sessionId=abc123; Path=/; HttpOnly')
* // Returns: { name: 'sessionId', value: 'abc123; Path=/; HttpOnly' }
*/
export declare const parseSetCookie: (setCookieValue: string) => {
name: string;
value: string;
} | null;
//# sourceMappingURL=parse-set-cookie.d.ts.map