query
Last updated
Was this helpful?
Last updated
Was this helpful?
The query function is just a helper function to help extract query parameters from URLs. It uses the WHATWG URL API under the hood to extract the query parameters and convert it from a to a JSON object.
If there are multiple query parameters with the same name, it will return an array instead of a string.
Simply call the query function inside of your handler.
Note that by default all query parameters are strings, and you will need to cast them as necessary.
After starting the dev server, you can make a request to and expect a response of