Is there something like a Response Interceptor in Adonis? #1946
-
I know about response macros but is there something like a global interceptor where all responses will go through in Adonis? For instance, to camelCase all keys in the object sent. |
Beta Was this translation helpful? Give feedback.
Answered by
RomainLanz
Nov 7, 2023
Replies: 1 comment 2 replies
-
Hey @LeCoupa! 👋 You can create a downstream middleware to do this. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can look at the documentation about middleware.
Write your code after the
await next()
call to execute anything after your handler's code.