Advertisement
eduedix

Untitled

Jan 31st, 2015
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var auth_header = 'Basic ' + token;
  2.  
  3.            $.ajax({
  4.                 url: '/api/v1.0/events',
  5.                 type: 'GET',
  6.                 dataType: 'json',
  7.                 //beforeSend: function(xhr) { xhr.setRequestHeader('Authorization', docCookies.getItem('token')); },
  8.                 beforeSend: function(xhr) { xhr.setRequestHeader('Authorization', auth_header); },
  9.                 success: function(data) {
  10.                     self.events(mapEvents(data));
  11.                     self.chosenEvent(null);
  12.                 }
  13.             });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement