Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var auth_header = 'Basic ' + token;
- $.ajax({
- url: '/api/v1.0/events',
- type: 'GET',
- dataType: 'json',
- //beforeSend: function(xhr) { xhr.setRequestHeader('Authorization', docCookies.getItem('token')); },
- beforeSend: function(xhr) { xhr.setRequestHeader('Authorization', auth_header); },
- success: function(data) {
- self.events(mapEvents(data));
- self.chosenEvent(null);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement