📜  jquery 标头基本身份验证 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:48.751000             🧑  作者: Mango

代码示例5
var auth = btoa('username:password');
$.ajax({
    type: 'GET',
    url: 'http://example.com',
    headers: {
        "Authorization": "Basic " + auth
    },
    success : function(data) {
    },
});