📜  axios 如何获取错误响应 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:10.780000             🧑  作者: Mango

代码示例6
axios.post('/formulas/create', {
    name: "",
    parts: ""
})
.then(response => { 
    console.log(response)
})
.catch(error => {
    console.log(error.response)
});