Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Map :params isn't necessarily Map of keyword -> String #57

Closed
terjesb opened this issue Feb 1, 2017 · 0 comments
Closed

Request Map :params isn't necessarily Map of keyword -> String #57

terjesb opened this issue Feb 1, 2017 · 0 comments

Comments

@terjesb
Copy link

terjesb commented Feb 1, 2017

http://pedestal.io/reference/request-map says that :params is a Map of keyword -> String.
Is this true if one doesn't add keyword-params to the default interceptors?
:params by default seem to use strings for form-params, even if they are keywords in :form-params.

In short, :params by default seems to be a map of keyword or String -> String.

lein new pedestal-service ps
;; verify project.clj is using pedestal.service 0.5.2
in service.clj add handler:
(defn post-test [request] (ring-resp/response request))
and route:
["/test" :post (conj common-interceptors `post-test)]

curl -X POST -d yo=lo localhost:8080/test?any=thing returns:
:params {:any "thing", "yo" "lo"}
:form-params {:yo "lo"}
:query-params {:any "thing"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant