Skip to content Skip to sidebar Skip to footer

Access To 'set-cookies' Header In $http

I am new in AngularJS and stacked in simple place. I run simple code: $http.post('/api/login/', {'user':'alexey','password':'alexey'}) .success(function(data, status, headers,

Solution 1:

For security reasons, you can't access the Set-Cookie header on the response from XMLHttpRequest. AngularJS $http uses the browsers XMLHttpRequest implementation.

4.7.4 The getAllResponseHeaders() method

Returns all headers from the response, with the exception of those whose field name is Set-Cookie or Set-Cookie2.

Post a Comment for "Access To 'set-cookies' Header In $http"