title: Compojure: how to map query parameters
body: <p>I'm trying to make any of the following mappings work to map <code>http://mysite.org/add?http://sitetoadd.com</code> or <code>http://mysite.org/add?u=http://sitetoadd.com</code></p>
  
  <pre><code>  (GET "/add?:url" [url] url)
    (GET "/add?u=:url" [url] url)
    (GET "/add" {params :params} (params :u))
    (GET "/add" {params :params} (params "u"))
    (GET "/add" [u] u)
  </code></pre>
  
  <p>But it just fails and I don't know why. On the other hand, this works:</p>
  
  <pre><code>  (GET "/add/:url" [url] url)
  </code></pre>
  
  <p>but I can't use it because I have to pass a url and <code>http://mysite.org/add/http://sitetoadd.com</code> is invalid while <code>http://mysite.org/add?http://sitetoadd.com is</code> ok.</p>
  
  <p><strong>EDIT</strong>: dumping <code>request</code> i've seen that params is empty. I thought that it would contain POST <strong>and</strong> GET parameters, but the only place where I can find the params I pass is in <strong>:query-string</strong> ("u=asd"). It <a href="https://stackoverflow.com/questions/6880641/compojure-routes-losing-params-info">seems</a> that a middleware is needed to parse query strings.  My question stands still, by the way.</p>