weavejester / compojure

A concise routing library for Ring/Clojure
Eclipse Public License 1.0
4.08k stars 259 forks source link

Can't user query parameters without a value #175

Closed ElizabethForest closed 6 years ago

ElizabethForest commented 6 years ago

Hi!

In the browser, you are able to do mywebsite.com?param and param shows up as a query param with an empty string, but when using compojure param doesn't show up in :query-params.

Doing mywebsite.com?param= gives the query-params of {:param ""} which is expected, but then if you do mywebsite.com?param=1&param2 you get {:param 1, :param2 nil}.

It feels a little inconsistent, and I would like to be able to use mywebsite.com?param.

I am using 1.6.0.

weavejester commented 6 years ago

Can you open this issue on Ring? Compojure doesn't have any opinion on how to parse query parameters.