Bug Description
MockAgent#intercept doesn't seem to support query params with square brackets for requests such as:
https://example.com/qux-c?arraykey[]=a&arraykey[]=b
Reproducible By
You can fine a minimal reproduction of this issue here: https://github.com/dario-piotrowicz/undici-square-params-repro
Expected Behavior
Such parameters should be supported, meaning that requests to https://example.com/qux-c?arraykey=a&arraykey=b and
https://example.com/qux-c?arraykey[]=a&arraykey[]=b should work practically in the same exact way
Environment
Mac OS Sequoia 15.3.2
Additional context
It seems like there is no consensus on the syntax for array search params (medium article) but that this syntax with square brackets is generally supported. (Someone also told me that there are/where some php frameworks that would only accept this syntax).
I've encountered this when trying to unit test code using the stripe-node package, it seems like the stripe platform enforces such syntax (stripe docs reference) so this is not really work-aroundable as far as I can tell.
Bug Description
MockAgent#interceptdoesn't seem to support query params with square brackets for requests such as:https://example.com/qux-c?arraykey[]=a&arraykey[]=bReproducible By
You can fine a minimal reproduction of this issue here: https://github.com/dario-piotrowicz/undici-square-params-repro
Expected Behavior
Such parameters should be supported, meaning that requests to
https://example.com/qux-c?arraykey=a&arraykey=bandhttps://example.com/qux-c?arraykey[]=a&arraykey[]=bshould work practically in the same exact wayEnvironment
Mac OS Sequoia 15.3.2
Additional context
It seems like there is no consensus on the syntax for array search params (medium article) but that this syntax with square brackets is generally supported. (Someone also told me that there are/where some php frameworks that would only accept this syntax).
I've encountered this when trying to unit test code using the
stripe-nodepackage, it seems like the stripe platform enforces such syntax (stripe docs reference) so this is not really work-aroundable as far as I can tell.