Replies: 2 comments
-
Any update on this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
RTK Query use URLSearchParams under the hood. You can customize this with the paramsSerializer option of baseQuery. I personnaly use qs instead. Eg. const baseQuery = fetchBaseQuery({
baseUrl: API_URL,
paramsSerializer: (params) => {
return qs.stringify(params);
}
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey everyone.
I'm trying to make a GET request via RTK Query.
{ url: '/some-url', method: 'GET', params: { filters } }
filters is an object. And it converts to "filters=%5Bobject+Object%5D" - what can I do about that? It worked perfectly fine when I used axios
Beta Was this translation helpful? Give feedback.
All reactions