Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. <add name="Access-Control-Allow-Origin" value="*" />
  2. <add name="Access-Control-Allow-Headers" value="Content-Type,Accept,X- FORMS_BASED_AUTH_ACCEPTED,crossDomain,credentials " />
  3. <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
  4. <add name="Access-Control-Allow-Credentials" value="true" />
  5.  
  6. $.ajax({
  7. url: url,
  8. headers: {
  9. Accept: "application/json;odata=verbose"
  10. },
  11. xhrFields: { withCredentials: true },
  12. async: false,
  13. success: function (data) {
  14. var items = data.d;
  15. console.log("Login Name: " + items.LoginName);
  16. console.log("Email: " + items.Email);
  17. console.log("ID: " + items.Id);
  18. console.log("Title: " + items.Title);
  19. },
  20. error: function (jqxr, errorCode, errorThrown) {
  21. console.log(jqxr.responseText);
  22. }
  23. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement