Axios POST Request:
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);
});
If I set headers as:
headers:{
Content-Type:'multipart/form-data'
}
If I make the related offer in postman it's working fine and sets values to my POJO class.
Can anyone describe how to establish a boundary or how can I send form data using Axios.