Getting a cookie from $ request

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

.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:


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