我正在运行一个包含AJAX调用的示例代码,并记录其响应以405错误结尾。仔细检查了api调用中的所有数据。
var settings = {
"url": "https://avaya.instapract.com/web/api/default/login",
"method": "POST",
"timeout": 0,
"headers": {
"APPID": "APPMDUECCX",
"lang": "da315627-3ece-2016-c628-b61dc5ee9be0",
"Content-Type": "application/json"
},
"data": "{\n \"username\": \"Doctor\",\n \"password\": \"Test@123\",\n \"device_id\": \"55c3389cb5ddd720dc0297617f3561c43a36218a277c974c8d43d545a643f45c\",\n \"os_id\": \"82d10438-70e9-4b75-842c-13df79aeb720\",\n \"time_zone\": \"America / New_York\",\n \"is_clinical_user\": \"no\",\n\"role_id\": \"143f37f2-ca38-0ab1-2489-1e47113655fc\"\n }",
};
$.ajax(settings).done(function (response) {
console.log(response);
});