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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing enqueue method to use routing-interceptor with sieppari? #599

Open
simonacca opened this issue Mar 21, 2023 · 0 comments
Open

Missing enqueue method to use routing-interceptor with sieppari? #599

simonacca opened this issue Mar 21, 2023 · 0 comments

Comments

@simonacca
Copy link

simonacca commented Mar 21, 2023

Hi there! First off thank you for providing such a high-performance and versatile library, reitit allows one to nicely compose so many ideas from the clojure ecosystem 馃殌

In an effort to have an HTTP server whose execution flow is ridicolously straightforward to understand, I'm trying to achieve a fully interceptor driven server, where each interceptor has one and only one job.

For example the interceptor stack might look like:

  • exceptions interceptor
  • format interceptor
  • default handlers interceptor
  • routing interceptor

That said, I'm a bit puzzled as to how one is supposed to use the routing interceptor. Below is how I configured the interceptor, but if I try to run it, it rightfully complains that the sieppari executor doesn't have an enqueue method.

Is there a reason why the sieppari executor can't have an enqueue method? If not, would you be happy to accept a PR introducing it?

(reitit.http/routing-interceptor
    (reitit.http/router ["/api"
                         {:get (fn [req] {:status 200
                                          :body {:res 4 :params (:query-params req)}})}])
    nil
    {:executor reitit.interceptor.sieppari/executor})

Thanks,
Simon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant