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

Mixing compojure.api.sweet/defapi and compojure.core/defroutes #459

Open
maksr opened this issue Mar 20, 2023 · 0 comments
Open

Mixing compojure.api.sweet/defapi and compojure.core/defroutes #459

maksr opened this issue Mar 20, 2023 · 0 comments

Comments

@maksr
Copy link

maksr commented Mar 20, 2023

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.

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