im trying to send data with ajax:
var id_cookie = read_cookie('replay_id');
id_cookie = JSON.stringify(id_cookie);
$.ajax({
url: remote_ip+':8124/show_replay',
data: {cookie: id_cookie},
dataType: "jsonp",
jsonpCallback: "start_replay",
cache: false,
timeout: 5000,
success: function(data) {
console.log("Received data: "+data);
console.log(data);
},
error: function(jqXHR, textStatus, errorThrown) {
alert('error ' + textStatus + " " + errorThrown);
}
});
and when I receive it I want to access the data
else if (req.method === "GET") {
// do something with the sent data here. req.data is undefined. How can I reach it?