Answer the question
In order to leave comments, you need to log in
The 'axios' library, having carefully studied api, did not manage to write data to the request body (body) how to do this correctly?
Chrome browser (pos. version)
this method does not work:
var params = new URLSearchParams();
params.append('param1', 'value1');
params.append('param2', 'value2');
axios.post('/foo', params);
Answer the question
In order to leave comments, you need to log in
var params = new FormData();
params.append('param1', 'value1');
params.append('param2', 'value2');
axios.post('/foo', params);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question