I'm trying to add header to request in Ajax with JQuery. Below is the code :- $.ajax({ type: "POST", contentType: "application/json", url: "http://localhost:8080/core-service/services/v1.0/patients/registerPatients", data: JSON.stringify(patientDTO), //crossDomain : true, dataType: 'json', headers: {"X-AUTH-TOKEN" : tokken}, success: function(patientDTO) { console.log("SUCCESS: ", patientDTO); /* location.href = "fieldagentHRA.html";*/ if (typeof(Storage) !== "undefined") { localStorage.setItem("patUrn", patientDTO.data); location.href="fieldagentHRA.html"; } }, error: function(e) { console