Replies: 1 comment
-
now that I thought about some more, maybe just a way of handling how a key is put together would be enough...for this case at least. What I did now in my code was something like this:
since the key would otherwise end up like Maybe it would be enough if we could control that? Something like another option you could supply,
|
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
-
Currently if you need special handling for parts of a query string, lets say one of the query params is an array of objects that the api your calling needs a special syntax for, like
?Foo[0].id=something&Foo[0].selected=yes
never mind if that's a good idea or not from an api perspective, sometimes that's out of your control.
Anyway, as said currently if you needed that and you had other query params that are "normal" ones (?bar=hello) you still need to replace the whole querySerializer anyway and basically copy/paste the code from the default one in the library and make some adjustments to make use of the defaultQueryParamSerializer when you can use that and otherwise handle that special one yourself.
I wonder if it would make a good case if you could provide something that can just hook into the defaultQueryParamSerializer instead and handle just one of the cases yourself? I don't really have a great idea on how or if there are better ways of doing this but maybe something like a callback thing that you could add as an option and the defaultQueryParamSerializer could look out for based on if the key matches in what you send in as an option and call your callback instead to get the value back?
Just opening this as an idea for now since I really don't have an idea on how or as said if it's a good idea?
And, thanks for a great library btw! It's a joy to use ❤️
Beta Was this translation helpful? Give feedback.
All reactions