Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery header basic auth

var auth = btoa('username:password');
$.ajax({
    type: 'GET',
    url: 'http://example.com',
    headers: {
        "Authorization": "Basic " + auth
    },
    success : function(data) {
    },
});
 
PREVIOUS NEXT
Tagged: #jquery #header #basic #auth
ADD COMMENT
Topic
Name
2+4 =