GET will read the data. you can use POST for sending it. see the below snippet:
var token = XMLHttpRequest.getResponseHeader('X-CSRF-Token');
$.ajax({
url: <target_url>,
type: "POST",
beforeSend: function(xhr)
{
xhr.setRequestHeader("X-CSRF-Token", token);
},
processData :false,
contentType: false,
POST_DATA:data,
success:function(){
alert("sucess in post");
},
error:function(){
alert("fail");
}
})
here, "data" would be anything that you have read, maybe a JSON being read from a GET.
so, initially you would read the data from a source URL and get it in say JSON format and then using POST, you can send it to the target URL.
Hope this helps!