Files
curlconverter/test/fixtures/node-axios/j_patch_array.js
Boris Verkhovskiy dda866a741 axios.post .put and .patch expect data as the second argument (#393)
* axios.post .put .patch take data as the 2nd arg

* rename formData to form

* add warning about data not being sent

* sort imports properly

* passing an object as data sends it as json, not urlencoded
2022-04-21 15:19:36 -07:00

12 lines
247 B
JavaScript
Generated

const axios = require('axios');
const response = await axios.patch(
'http://localhost:28139/patch',
'item[]=1&item[]=2&item[]=3',
{
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
);