Case insensitive query params
We are using hono-zod-openapi to replace an existing API.
Sadly the old API (written in ASP.Net) appears to have case-insensitive handling of parameters - and we may need to emulate this. Gah.
So we have something like
But I need to support
GET /blah?fooBar=
and all other variants of FooBar
and foobar
etc.
Any ideas? I guess worst case we could add some middleware to downcase all parameters or something.1 Reply
I’m not sure if there is a special way to do it. I would just convert everything to lowercase like you mentioned. I always do it myself as well