ajax call test header code example
Example 1: pass header in ajax
$.ajax({
url: "/test",
headers: {"X-Test-Header": "test-value"}
});
Example 2: jquery ajax $.post with data
$.post('http://example.com/form.php', {category:'client', type:'premium'}, function(response){
alert("success");
$("#mypar").html(response.amount);
});