I am just trying my first reactJS app.
In that I am using axios.post() method for sending data.
submitHandler = event => {
event.preventDefault();
axios
.post("http://demo.com/api/v1/end-user/login", {
username: "",
password: "",
user_type: 1
})
.then(res => {
console.log(res);
console.log(res.data);
});
}
But when I check into my network tab, data which I am sending along with request is seems to be in payload.
I would like to send the data as form data instead. Am I am missing something?