Fix: Don't add null values to query string. #5108
Conversation
|
Yes please! |
|
@jasonsaayman were there merge conflicts? Seems like some odd things from the merge. (Like the readme for example) |
|
Thank you! |
* feat: add boolean flag to mimic pre 1.x behavior for paramsSerializer custom function * chore: update ParamsSerializer Readme * fix: dont slice hash off URL if not appending params * Omit nulls from formData serialization * fix: dont add nulls or undefined values to arrays either * readme update * fix test * chore: documentation * chore: do TS properly Co-authored-by: Jay <jasonsaayman@gmail.com>
Nulls were being included as empty string |
|
As far as I understood, there is multiple use cases to have query string with keys without values Could that be considered? |
|
@OzQu I get the ask, however if you look at the behavior, an unset query Param returns an empty string when parsed via If you want We can add it back in, but know it's up to the API to correctly handle this behavior when deserializing into your request object. |

This aims to resolve Feature Request #5107 and #5094
We added a "backwards compatibility" to allow serializing params with our own custom function instead of the current iterative toString approach.