You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Axios client, URL query parameters aren't formatting as you'd expect when dealing with objects. As an example, if you were to pass the following to Axios:
The expected behaviour is that Axios would send a request with the URL formatted as:
https://some-url?foo[bar]=true
However, when using this library, the URL is encoded slightly differently, and looks more like:
http://some-url?foo=%7B%22bar%22:true%7D
I investigated overriding the fetch method and some of the other options, but it seems by the time the configuration reaches those functions the URL has already been formatted.
Given that the library is using Axios.instance.request when using the Axios client, it would be nice if there was a way to pass the params directly into the Axios.instance.request function and let it encode the URL params itself, or at the very least encode the URL params in the same fashion.
Reproduction/Logs 🐞📜
I tested this with a simple path helper that sends a GET request to an endpoint, with a call like the following:
Description 📖
When using the Axios client, URL query parameters aren't formatting as you'd expect when dealing with objects. As an example, if you were to pass the following to Axios:
The expected behaviour is that Axios would send a request with the URL formatted as:
https://some-url?foo[bar]=true
However, when using this library, the URL is encoded slightly differently, and looks more like:
http://some-url?foo=%7B%22bar%22:true%7D
I investigated overriding the
fetch
method and some of the other options, but it seems by the time the configuration reaches those functions the URL has already been formatted.Given that the library is using
Axios.instance.request
when using the Axios client, it would be nice if there was a way to pass the params directly into theAxios.instance.request
function and let it encode the URL params itself, or at the very least encode the URL params in the same fashion.Reproduction/Logs 🐞📜
I tested this with a simple path helper that sends a GET request to an endpoint, with a call like the following:
Let me know if you need any more detail on this.
The text was updated successfully, but these errors were encountered: