up vote
down votefavorite 
<https://stackoverflow.com/questions/47034632/angular-4-set-cookie-flag-in-http-response-is-not-setting-cookie-in-browse#>

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); });



<https://lh3.googleusercontent.com/-5Jb74czbay0/WfiBI5AnByI/AAAAAAAAAAM/fCQ11kcsI_YlHAioKDmKwX6G2Y1lL3eyACLcBGAs/s1600/Screenshot%2Bfrom%2B2017-10-31%2B17-07-48.png>

<https://lh3.googleusercontent.com/-71tk_JgVgsw/WfiBLh5n49I/AAAAAAAAAAQ/L2u-HcxvVIAoZ2O5yk2PKgZDqRv3H_CjgCLcBGAs/s1600/Screenshot%2Bfrom%2B2017-10-31%2B17-08-19.png>

<https://lh3.googleusercontent.com/-tkjLqXhc8Ww/WfiBN883lBI/AAAAAAAAAAU/LV_XlUzRU0gHiay0fXeTIFNXqqzah2HMwCLcBGAs/s1600/Screenshot%2Bfrom%2B2017-10-31%2B17-08-40.png>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to