Compojure:如何将查询参数作为地图获取

Compojure: How to get query parameters as a map

我刚刚使用此文档通过 Luminus 创建了我的 RESTful 服务:http://www.luminusweb.net/docs/services.md

显然 Compojure-API 使用 Schema 库来映射查询参数。但是,我希望能够将所有查询参数作为单个映射获取。例如:

由此GET /api/myapp?color=green&shape=round&height=100 对此 {:color "green", :shape "round", :height "100"}

谢谢!

知道了。

我以此为例(GET "/test" {params :params} (str params))params 是具有给定查询参数的键和值的映射。