我用 NTLM auth 编写了我的 API 的负载测试(这里我另外检查 NTLM 授权用户是否存在于数据库中)。在请求期间:
var url = 'https://login:*****@localhost:xxxx/api/authorization/logon';
var payload = { };
var params = {
headers: {
'Content-Type': 'application/json'
},
};
let response = http.post(url, params, {auth: "ntlm"});
check(response, {
'status is 200': (r) => r.status === 200
});
}
我有一个错误:
error="发布 "https://user:*****@localhost:xxx/api/authorization/logon": 流错误: 流 ID 3; HTTP_1_1_REQUIRED"。
为什么?Kestrel 服务于 HTTP/1.1