Axios has recently done a major upgrade and starting by its version 1.x I am unable to correctly introduce my own parameter serializer to it.
I used to do it as follows:
axios.defaults.paramsSerializer = params => qs.stringify(params, { arrayFormat: 'comma', encode: false });
Now the definition of paramsSerializer is changed to the following:
axios.defaults.paramsSerializer = {
indexes: null,
encode: ...
}
Does anyone know how I can assign my serializer to it considering the new definition?
I was facing the same issue, and this comment helps me a lot https://github.com/axios/axios/issues/5058#issuecomment-1272107602
Hope you find it useful
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With