我想将授权标头添加到登录请求中。我尝试用代码做到这一点:
function dblogin (credential){
$.couch.login({
name:credential.name,
password:credential.password,
headers: {'Authorization': 'Basic ...'},
success: function (data){console.log("loggato con successo!");},
error: function(status) {console.log("login non riuscito!" + status);}
});
}
但我看到在 HTTP 请求标头中,字段 Authorization 不存在。为什么?