I am making request calls using $.ajax, with post.
The problem is, the post variables are becoming part of the request header, which is causing error when our software is using it to check signatures using the request.
$.ajax({
url: oauth.signed_url,
type: "POST",
beforeSend: function(jqXHR, settings) {},
dataType: "json",
headers: oauth.header,
data: {
description: "TESTME2222"
},
success: function(data) {
//console.log(data);
}
});
This line: headers: oauth.header,
is the header I want to use, but apparently it appends to the existing header. Is there any way to replace headers?
EDIT:
I understand I can modify the headers using beforeSend function, but the problem is, i want to get rid of some of them. From what I know, can't really do that using the jqXHR object. It would be easier for me if i just replace the whole thing.