I am working with angularjs - 1.6.
I need to send one http GET request to server along with a cookie explicitly.
I mean, I know once we get authorization done successfully, cookies are being sent with every http request automatically.
But in my case, I need to send it explicitly. How can I achieve so. Below is the https code:
$cookies.put('JSESSIONID', 'lu5xxkdqgjk5qpv07ufhvln3');
$http({
url:"http://10.11.0.11:4440/api/21/projects",
method:"GET",
headers: { 'Accept': 'application/json',
'X-Rundeck-Auth-Token':'lu5xxkdqgjk5qpv07ufhvln3'},
"Access-Control-Allow-Credentials" : true
}).then(function(response) {
$scope.response = response.data;
alert("Report fot succeed"+response.data);
}, function(response) {
alert("error response:"+response.data);
});