I have a API that updates data in the database but then returns back a query. The API takes a single parameter and it works when testing it manually through browser and when also testing using a axios get request. However for security purposes I wanted to try and stick with POST request and to just test it out, however if I try to run this via a POST (change axios.get to axios.post) request the parameter value is not passed to the API. Here is my axios request below. What could be the issue?
axios.post(window.location.origin + '/API/StateContacts', {
params: {
STATE_DD_INPUT: stateDD
}
})
.then(response => {
this.stateContactsArray = response.data;
}).catch(error => {
console.log(error.response.data.error);
});