Angular 4 : " Set Cookie " flag in Http response is not setting Cookie in browser

2.3k Views Asked by At

I'm working on a Website using Angular 4. We are using Cookie authentication method. After login process API response have cookie in Set Cookie field. But its not setting value in browser. So authentication of other APIs get failed. While using postman its working fine. Following is the Angular code using http get method ( this Api is created for testing purpose.)

this.http.get(
'http://test.xxx.com/test/testjsondata/login', 
{ withCredentials : true}
) 
.map(res => res.json()).
subscribe(data => {   console.log(data); });

Chrome console of apiCookies in Api responseCookies are not added in browser

0

There are 0 best solutions below