I’m trying to make a get request to a API that requires a cookie.
I get a Refused to set unsafe header “Cookie" error
I’m using the Chrome extension for CORS and dont own the API
headers.append(‘Cookie’,’Cookie value’);
let options = new RequestOptions({
headers: headers,
withCredentials: true
});
var response = this.http
.get('website', options)
.map(res => {
return res;
})
thats the main bit. Atm i login via PAW(software) while I test. I receive the cookie data and then include it in headers.append(‘Cookie’,’Cookie value’);
Cookies are managed by the browser and browser’s users cannot interact with cookies (without some hacks).
I will continue to find more information and try to provide conclusions but if someone of the Ionic team can enlighten us with the management of cookies between an Ionic2 app and a cookie-based backend, it will be a big step for our journey.