报错信息
Bad Request
The browser (or proxy) sent a request that this server could not understand.
- post请求 参数是否一致
- post请求 参数类型是否一致
例如上图:uuid和user都是必填项,值传递一个参数肯定报错400
还有就是传参数据格式需要是form-data形式的
function check(uuid) {
var formData = new FormData();
formData.append("uuid", uuid);
formData.append("user", "zhouhaidong");
$.ajax({
type: 'POST',
url: 'http://nkyzhd_apis.philisensedev.com/v2/apis/xlsxcheck/',
data: formData,
processData: false,
contentType: false,
})
.done(function (json) {
alert(json)
})
.fail(function () {
console.log("error")
})
}
参考:https://blog.csdn.net/danxingqingtian/article/details/81146286