这有效:
const res = await axios.post(this.url, body, {
headers: this.headersObj
});
抛出错误:
const res = await axios.post(this.url, body, {
headers: this.headersObj,
onUploadProgress: progressEvent => {
console.log(progressEvent.loaded)
}
})
谢谢!