Answers for "pasing form state detail to react axios"

0

axios react post form data

var body = {
    userName: 'Fred',
    userEmail: '[email protected]'
}

axios({
    method: 'post',
    url: '/addUser',
    data: body
})
.then(function (response) {
    console.log(response);
})
.catch(function (error) {
    console.log(error);
});
Posted by: Guest on November-26-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language