Does anyone know if it is possible to save cookies after logging in to http after logging in to angular 2? When I check the headers in response, I see that there are cookies, but they will not be saved in the browser, and I will not be able to access them.

I also tried accessing the 'set-cookie' directly, but did not work.
this.http.post(this.serverUrl+"/login/", {data: {email: email, pass: pass}}) .subscribe(res => { let headers: Headers = res.headers; let cook = headers.getAll('Set-Cookie'));
I will be very happy for any help I donβt know about how to do this and save cookies. Thanks.
source share