Library Version(s)
[metosin/compojure-api "1.1.13"]
[compojure "1.6.1"]
Problem
I have two handlers, defined as
(compojure.api.sweet/defapi restful-routes...)
(compojure.core/defroutes public-routes...)
When I combine them with
(compojure.core/routes #'restful-routes #'public-routes)
the POST requests to public routes loose :body parameters. The body comes through as org.eclipse.jetty.server.HttpInputOverHTTP, but it has been read somwhere in the middleware so its content is not available.
I blame compojure.api.sweet for this, because when I reverse the call order to
(compojure.core/routes #'public-routes #'restful-routes)
it works fine, the body streams in POST methods are available in both handlers.