Skip to content

Instantly share code, notes, and snippets.

@sihugh
Created May 29, 2015 10:57
Show Gist options
  • Save sihugh/31382b1a5ceb99e7d19e to your computer and use it in GitHub Desktop.
Save sihugh/31382b1a5ceb99e7d19e to your computer and use it in GitHub Desktop.
CRSF Token in SharePoint Web Service Request
var formDigestValue = $("#__REQUESTDIGEST").val();
$.ajax({
headers: { "X-RequestDigest": formDigestValue },
url: url,
method: "POST",
contentType: "application/json",
data: JSON.stringify(data),
success: success,
error: error
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment