Closed piotr-yuxuan closed 5 years ago
As responded in Slack, you need to write json strings manually.
(mock/request :post "/application/path/endpoint" {:a 7} ...)
=>
(mock/request :post "/application/path/endpoint" (cheshire/generate-string {:a 7}) ...)
Library Version(s)
Observation
I'm trying to coerce and validate request following these examples:
https://github.com/metosin/c2/blob/master/src/c2/spec.clj https://www.metosin.fi/blog/clojure-spec-with-ring-and-swagger/
However I haven't found so far how to get the request body in the handler.
Complete code is available in this minimum working example repository.
Problem?
It may be a bug, or another example would be much appreciated.