I am trying to GET list items from SharePoint 2013 using REST API and ajax call.It is returning by default ATOM+XML. I want the response in JSON format. I tried the following however still same XML format response:
"/_api/lists/getbytitle(ListName)/Items/?$filter=lookupName/LookupNameInSourceListName eq 'col_Name'& $select=LinkTitle,Image,lookupName/LookupNameInSourceListName&$expand=lookupName/LookupNameInSourceListName&$orderby=TabOrder asc"
$.ajax({
url: url,
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
success: function (data) {
success(data);
},
error: function (data) {
failure(data);
}
});