dom96 / jester

A sinatra-like web framework for Nim.
MIT License
1.56k stars 120 forks source link

No way to get raw query parameters #288

Closed ajusa closed 2 years ago

ajusa commented 2 years ago

As far as I can tell, Jester doesn't provide any way to get the raw query parameters, and the params implementation as a string to string mapping is problematic because query keys can be repeated. Here's an example:

?field=hi&field=bye

In this case, params would just have field:bye. HTML <select multiple uses this format to send multiple choices that have been selected, as do checkboxes. Right now, as far as I can tell, it is impossible to have a multiselect without additional javascript to send it as JSON rather than a query string. I could be mistaken, but I glanced through the code and the required variables to do it are private.

PR inbound to just get the query string, similar to the path proc.