📜  axios post formdata - Javascript代码示例

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

代码示例3
var body = {
    userName: 'Fred',
    userEmail: 'Flintstone@gmail.com'
}

axios({
    method: 'post',
    url: '/addUser',
    data: body
})
.then(function (response) {
    console.log(response);
})
.catch(function (error) {
    console.log(error);
});