Difficulty in creating payload for AXIOS post request
-
Please help me!
Ive been struggling to send an AXIOS post request to my server so that it can add a record to a mysql database. My latest attempt elicits an error - “PayloadTooLargeError: request entity too large”.
This is my request :
addtherecord() {
this.$axios.post(‘http://45.32.144.199:3000/addtherecord’,{
test_name: this.test_name,
})
.then(function (response) {
currentObj.output = response.data;
})
.catch(function (error) {
currentObj.output = error;
});
}
What am I doing wrong?
Many thanks -
usually i need to pass a header object as a 3 paramenter on a post request. check in postman for example that call with no headers and see if you get the same error
-
I’ll try that. Thanks. I feel Ive been going round in circles trying to sort this.