我在使用dropzonejs发送授权标头时遇到问题
switch (exit_code) {
case QMessageBox::Save:
// Save was clicked
break;
case QMessageBox::Discard:
// Don't Save was clicked
break;
case QMessageBox::Cancel:
// Cancel was clicked
break;
default:
// should never be reached
break;
}
答案 0 :(得分:1)
基于the code,标头的定义如下:
var headers = {
"Accept": "application/json",
"Cache-Control": "no-cache",
"X-Requested-With": "XMLHttpRequest"
};
因此,定义类似于
headers: { "Authorization" : "Bearer AbCdEf123456" }
应该工作。