Axios: send null as parameter in request
Is it possible to pass a null parameter to axios? It seems that null values ββare just being ignored ...
+3
FMF
source
to share
1 answer
An empty line should do the trick.
var data = new FormData();
data.append('location_id', '');
axios.post('/location/update', data)
.then(function(response) {
console.log(response.data);
})
.catch(function(error) {
console.log(error);
});
+2
Ken tan
source
to share