Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <add name="Access-Control-Allow-Origin" value="*" />
- <add name="Access-Control-Allow-Headers" value="Content-Type,Accept,X- FORMS_BASED_AUTH_ACCEPTED,crossDomain,credentials " />
- <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
- <add name="Access-Control-Allow-Credentials" value="true" />
- $.ajax({
- url: url,
- headers: {
- Accept: "application/json;odata=verbose"
- },
- xhrFields: { withCredentials: true },
- async: false,
- success: function (data) {
- var items = data.d;
- console.log("Login Name: " + items.LoginName);
- console.log("Email: " + items.Email);
- console.log("ID: " + items.Id);
- console.log("Title: " + items.Title);
- },
- error: function (jqxr, errorCode, errorThrown) {
- console.log(jqxr.responseText);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement