ajax add header
$.ajax({
url: "/test",
headers: {"X-Test-Header": "test-value"}
});
5
2
$.ajax({
type: "POST",
beforeSend: function(request) {
request.setRequestHeader("Authority", authorizationToken);
},
url: "entities",
data: "json=" + escape(JSON.stringify(createRequestObject)),
processData: false,
success: function(msg) {
$("#results").append("The result =" + StringifyPretty(msg));
}
});
Thank you!
2
0
Are there any code examples left?
New code examples in category Javascript