Advertisement
Guest User

Untitled

a guest
Sep 15th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function() {
  2.   $.ajax({
  3.     url: 'https://apps.fhict.nl:443/api/v1/people/important',
  4.     xhrFields: {
  5.       withCredentials: true // Cookies meesturen
  6.     },
  7.     crossDomain: true,
  8.     success: function(data) {
  9.       alert('Jes!');
  10.       console.log(data);
  11.     },
  12.     error: function(data) {
  13.       alert('Balen.');
  14.       console.log(data);
  15.     }
  16.   });
  17. });
  18.  
  19. // OUTPUT:
  20. // XMLHttpRequest cannot load https://apps.fhict.nl/api/v1/people/important.
  21. // No 'Access-Control-Allow-Origin' header is present on the requested resource.
  22. // Origin 'http://localhost:9000' is therefore not allowed access.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement