Skip to content

Instantly share code, notes, and snippets.

@balavec
Created November 28, 2018 08:37
Show Gist options
  • Save balavec/8e01a08cbc09564a31da53989929c8ff to your computer and use it in GitHub Desktop.
Save balavec/8e01a08cbc09564a31da53989929c8ff to your computer and use it in GitHub Desktop.
/* Make sure jQuery is available. */
/* Make sure you have proper URL. */
$.ajax({
url: "/_api/web/lists/GetByTitle('ListName')/Items",
headers:
{
"Accept": "application/json;odata=nometadata",
"Content-Type": "application/json;odata=nometadata",
"odata-version": ""
},
success: function(data)
{
console.log(data);
},
error: function(data)
{
console.log(data.responseJSON.error);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment