Advertisement
Guest User

Untitled

a guest
Apr 27th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. curl --basic --user {username}:{password} https://www.blueworkslive.com/api/Auth
  2.  
  3. $.ajax({
  4. url: "https://www.blueworkslive.com/api/Auth",
  5. type: "GET", //This is what you should chage
  6. dataType: "jsonp",
  7. username: "admin", // Most SAP web services require credentials
  8. password: "admin",
  9. processData: false,
  10. contentType: "application/json; charset=utf-8",
  11. success: function () {
  12. alert("success");
  13. console.log("success");
  14. },
  15. error: function (xhr, ajaxOptions, thrownError) {
  16. console.log("error");
  17. console.log(xhr.responseText);
  18. alert(xhr.status);
  19. alert(xhr.responseText);
  20. },
  21. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement