📅  最后修改于: 2022-03-11 15:01:48.751000             🧑  作者: Mango
var auth = btoa('username:password');
$.ajax({
type: 'GET',
url: 'http://example.com',
headers: {
"Authorization": "Basic " + auth
},
success : function(data) {
},
});