Suspendable ServerRequestFilter in Resteasy Reactive
See original GitHub issueDescription
The following return types are currently possible in Resteasy Reactive Filters (@ServerRequestFilter
): void
, Response
, RestResponse
, Optional<Response>
, Optional<RestResponse>
, Uni <Void>
, Uni<RestResponse>
or Uni <Response>
.
Please add support for suspendable filters (Kotlin Coroutines).
Example
class Filters {
@ServerRequestFilter(preMatching = true)
suspend fun preMatchingFilter(requestContext: ContainerRequestContext): RestResponse<String>? {
return if (requestContext.method == HttpMethod.GET) {
RestResponse.ok("GET", MediaType.TEXT_PLAIN_TYPE)
} else {
null
}
}
}
Implementation ideas
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Writing REST Services with RESTEasy Reactive - Quarkus
This is the reference guide for RESTEasy Reactive. ... case the current HTTP request will be automatically suspended after your method, ...
Read more >Using reactive @ServerRequestFilter with RestClient in Quarkus
resteasy.reactive.common.core.BlockingNotAllowedException because of this call. Since I'm using Kotlin, i tried to mark my method as suspendable ...
Read more >ServerRequestFilter (RESTEasy Reactive - Runtime 1.13.5 ...
When used on a method, then an implementation of ContainerRequestFilter is generated that calls the annotated method with the proper arguments.
Read more >Resteasy Reactive: Kotlin `Flow` and `Multi` are not supported ...
Flow and Multi cannot be returned from a suspendable function (resteasy reactive). Expected behavior. No response. Actual behavior. No response ...
Read more >chore(deps): update dependency io.quarkus:quarkus ... - GitLab
An error occurred while retrieving approval data for this merge request. chore(deps): update dependency io.quarkus:quarkus ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://github.com/quarkusio/quarkus/pull/20529 introduces this feature
Yeah, we can certainly do that. But it will likely be a
2.3
enhancement, not a2.2
one