serviejs / popsicle

Simple HTTP requests for node and the browser
MIT License
246 stars 19 forks source link

How to get Set-Cookie headers from server? #93

Closed kokizzu closed 7 years ago

kokizzu commented 7 years ago

All I see on the response.d.ts are:

export declare class Response extends Base {
    status: number;
    statusText: string;
    body: any;
    constructor(options: ResponseOptions);
    statusType(): number;
    toJSON(): ResponseJSON;
}

no terms like header so I can fetch the Set-Cookie value.

blakeembrey commented 7 years ago

See Base. You can access the headers for requests and responses. However, if this is a browser you won't be able to access the header as its restricted by the browser (certain headers you can alter or read from code).