Hello everyone,
my question is, how to send a cookie with setRequestHeader. My code to test it is this one:
var client = new XMLHttpRequest();
client.open('POST', 'url');
client.setRequestHeader('Cookie', 'test=mycookie');
client.setRequestHeader('Cookie', 'test=mycookie');
alert("start");
client.onreadystatechange = function() {
if(client.readyState == 4 && client.status == 200){
alert("beginning");
alert(client.getAllResponseHeaders());
document.getElementById('test').innerHTML = client.responseText;
alert("end");
}
}
client.send();
The getAllResponseHeaders()-method gives only caontent-type. But how I can see if the cookie is set or not?
So it must be javascript and document.cookie is no way, because i develope for the Nokia WRT and it doesn't use this.
Thanx for your help