this is a part of my url url -
foo?$filter=fooNum eq '1234567'
when sending the axios request, axios encodes it to - foot%24filter=fooNum+eq+%27123456%27
Now my backend doesnt understand "+" and %24 as $. Also axios automatically eliminates the '?' which I need in the url.
Expected url should be this - foo?$filter=fooNum%20eq%20%271234567%27
I have tried using paramsSerializer, endcodeComponentURI, but nothing works. I am using axios version - 1.1.3
Using
paramsSerializeris the way to go. Run each parameter key / value through encodeURIComponent() and replace%24with$.Make sure you use the
paramsoption when making your requests to take advantage of the serialiser.