Closed mpyw closed 1 year ago
It might be broken if you customized snake-case functions.
const client = applyCaseMiddleware(axios.create(), { caseFunctions: { snake: (s) => s.replace(/[A-Z]|\d+/g, (s) => `_${s.toLowerCase()}`), }, }); cleint.post({ data: ['X', 'Y']});
The code above actually sends {"data": []} instead of {"data": ["X", "Y"]}because it transforms
{"data": []}
{"data": ["X", "Y"]}
Array { 0: 'X', 1: 'Y', length: 2 }
into
Array { '_0': 'X', '_1': 'Y', length: 2 }
It might be broken if you customized snake-case functions.
The code above actually sends
{"data": []}
instead of{"data": ["X", "Y"]}
because it transformsinto