500 Internal server not found using item service

 

Am facing 500 Internal server not found

error during item creation using itemservice in sitecore

Kindly note GET Method is working to get items.


Below i attached the code that i used.

var xhr = new XMLHttpRequest();
xhr.open("POST", "sitecore91.sc/.../Home ");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.onreadystatechange = function () {
if (this.readyState == 4) {
alert('Status: ' + this.status + '\nHeaders: ' + JSON.stringify(this.getAllResponseHeaders()) + '\nBody: ' + this.responseText);
}
};
xhr.send("{\"ItemName\": \"Home\",\"TemplateID\": \"76036f5e-cbce-46d1-af0a-4143f9b557aa\"}");