Guest User

Untitled

a guest
Dec 14th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. $.ajax({
  2. url: endPoint,
  3. type: 'POST',
  4. async: false,
  5. contentType: "application/json; charset=utf-8",
  6. dataType: "json",
  7. username: myUsername,
  8. password: myPassword,
  9. beforeSend: function (xhr) {
  10. xhr.withCredentials = true;
  11. xhr.setRequestHeader("Accept", "application/json; odata=verbose");
  12. }
  13. });
  14.  
  15. let url = baseProtocol + username + ":" + password + "@" + baseUrl
Add Comment
Please, Sign In to add comment