-
Notifications
You must be signed in to change notification settings - Fork 257
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
Reitit default middleware #114
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ikitommi
force-pushed
the
reitit-middleware
branch
from
July 25, 2018 07:56
3162000
to
0c2ab98
Compare
ikitommi
force-pushed
the
master
branch
2 times, most recently
from
July 25, 2018 08:17
e1bf019
to
ef7a916
Compare
ikitommi
force-pushed
the
reitit-middleware
branch
from
July 28, 2018 09:17
34bc882
to
f418b34
Compare
ikitommi
force-pushed
the
reitit-middleware
branch
from
August 2, 2018 13:12
6bb233d
to
cc00ddb
Compare
reviewed by @jarppe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
new module
metosin/reitit-middleware
with common / handy ring-middleware, aiming to be on par with compojure-api.Review the decisions:
exception-middleware
:handlers
key. As there are no other top-level keys, the handlers-map is the only arg taken. I think this is better this way. There is also new:reitit.ring.middleware.exception/wrap
key which can be used for example to log all errors - like ring middleware, but for exception handlers, takes 3 args instead of the normal 2 (handler being the first one). With the old options-syntax, this could be the other top-level key in options besides the:handlers
, but a special key gives better ergonomics I think.multipart-middleware
muuntaja
:muuntaja
key from route data. If that is not set, nothing happens (without any warning!)=> I think the explicit
:muuntaja
key is good.naming
reitit-middleware
orreitit-ring-middleware
or something different?reitit.ring.middleware.exception
or justreitit.middleware.exception
?