Sharepoint - ajax call with SharePoint REST API to get JSON response
Thanks for the answer: i tried no luck.
This one worked for me:
$.ajax({
url: Url,
method: 'GET',
beforeSend: function (XMLHttpRequest) {
XMLHttpRequest.setRequestHeader("Accept", "application/json; odata=verbose");
},
cache: true,
error: function (data) { ////failure },
success: function (data) { ////success }
});