I am making a post request to the API but the problem that i see is that the authtoken gets sent in request payload instead of request headers in network tab.
const fetchData =(id,authToken)=>
axios
.post(`${APIUrl}/${id}/math`,{
headers:{
...getAuthHeaderWithContentType(authToken, "JSON")
}
})
.then(resp => (resp && resp.data ? resp.data : null));
The headers should appear in request headers instead of request payload .