AngularJS getting request header of $http


I want to get the $http cookie request header after a request but the $http only returns a response according to the AngularJS documentation. Here is the cookie I want to get:

I tried adding an interceptor but I couldn’t see the cookie. Here is the output from my interceptor:

My interceptor and some settings:

$provide.factory(‘myHttpInterceptor’, function() {
return {
// optional method
’request’: function(config) {
return config;

$httpProvider.defaults.useXDomain = true;
//Remove text on back button
$ionicConfigProvider.backButton.previousTitleText(false).text('  ');
$httpProvider.defaults.withCredentials = true;
//Setting angularjs' $http to behave as url encoded parameters and request instead of JSON
$['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';


Did you find an answer for this ?