Hi I am in developing Angularjs web application. I am using API's to get data. On login successful i will get some data in cookie(response header). In very next subsequent http calls i need to send that back cookies data to apis. Below is the snapshot of response header.
Below is my sample $http call.
var req = {
method: 'POST',
url: savepersonaldetailsurl,
headers: {
RequestedPlatform: "Web",
RequestedLanguage: cookiePreferredLanguage
},
data: {
LoginId: LoginID
}
$http(req).then(function (response) {
//do something here
}, function (error) {
toastr.error($filter('translate')('Error Occured'));
});
On each http call i want to send cookie in header. May i know how this can be done in angularjs? Any help would be appreciated. Thank you.
