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