Support for any HTTP method/verb
See original GitHub issueDescribe the feature I’m implementing an External Authentication service for the popular Ambassador API gateway system (https://www.getambassador.io/reference/services/auth-service) and one of the requirements is that the Extauth handler be able to process the same HTTP verb as the original request. Three problems:
-
In a a self-service microservices architecture I can’t control what developers are using for HTTP verbs. Ambassador is self serve so they might design an API that uses all the HTTP verbs OR (annoyingly) use custom ones. I need to handle that.
-
It’s tedious to write handlers for all the HTTP verbs Javalin currently knows how to handle.
-
Using
before
is non-obvious (but was suggested by @tipsy on Gitter)
Additional context
With regards to point #3 perhaps the best way to do this is something like any(methods: Set<String>)
where if any of the methods in the provided set match then the handler is invoked. If methods
is empty then it matches all verbs.
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (15 by maintainers)
I’m gonna wrap this one up soon (definitely before GH-330). This triggered that issue but we’re still broken on JDK9+ regardless of this change so I’m not gonna block myself waiting to find time to finish the JDK9+ support.
Don’t worry about it @plombardi89. It is indeed a niche problem, so I will close this as wontfix. If it ever comes up again I will implement it.