Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var username = 'x',
- password = 'x';
- var base64 = btoa(username + ":" + password);
- $.ajax({
- url: 'x',
- type: 'GET',
- beforeSend: function(xhr) {
- xhr.setRequestHeader('Authorization', 'Basic ' + base64);
- },
- data: {}
- });
Add Comment
Please, Sign In to add comment