I am trying to develop an application using reactjs as front end framework and laravel 5.6 as back end framework. I am trying to send AJAX request like below
import Auth from '../services/Auth';
var address_data = {
name :'foysal',
address :'foysal',
telephone_no:'foysal',
email :'foysal',
}
fetch('http://127.0.0.1:8000/api/addresses/store/',address_data, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + Auth.getToken(),
},
body: JSON.stringify()
})
.then((response) => response.json())
.then((responseData) => {
console.log(responseData);
})
I am getting below errors


body: JSON.stringify()do you mean body:JSON.stringify(address_data)?GETand notPOST. Please refer developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch on how to usefetchotherwise use simpleajaxrequestGETrequest ? I think the issue is here ? What should I correct ? Thanks.