2 fang062407 fang062407 于 2013.11.08 10:29 提问

FTP模拟HTTP Basic Authorization

类似于HTTP协议
$.ajax
({
type: "GET",
url: "index1.php",
dataType: 'json',
async: false,
data: '{}',
beforeSend: function (xhr){
xhr.setRequestHeader('Authorization', "Basic " + btoa(username+":"+password));
},
success: function (){
alert('Thanks for your comment!');
}
});

Csdn user default icon
上传中...
上传图片
插入图片