Getting a cookie from $http.post request

For some reasons I cannot fetch that cookie from the response that I get after http.post request:

$http({
...
}).
.success(function(data, status, header) {

console.log(header('Set-Cookie')); // returns null
console.log(header('cookie')); // returns null
console.log($cookies) // returns an empty object

});

However it all perfectly works on a device, but not in my browser. I tried to run Chrome with open -a Google\ Chrome --args --disable-web-security but it also didn’t help…

You probably need bracket notation to access the property on the response object:

console.log(header['Cookie'])

Running in to this issue as well. I attempted using @adrichman’s suggestion but header[‘Cookie’] returns undefined as well.