SHARE
TWEET

Untitled

a guest Jun 16th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.         });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top