Currently when returning a Uni or Multi, there is no easy way to set a response header or a the HTTP status.
We should provide and document a way to do this.
Implementation ideas
There are two ways I can think of:
1) We introduce @Header and @Status annotations that can be placed on a resource method and if the method was executed properly, these annotations set the corresponding response properties.
2) We allow the use of RestResponse<Uni<T>> and RestResponse<Multi<T>>. This would allow more control, but might be more cumbersome to use.
Description
Currently when returning a
Uni
orMulti
, there is no easy way to set a response header or a the HTTP status. We should provide and document a way to do this.Implementation ideas
There are two ways I can think of:
1) We introduce
@Header
and@Status
annotations that can be placed on a resource method and if the method was executed properly, these annotations set the corresponding response properties. 2) We allow the use ofRestResponse<Uni<T>>
andRestResponse<Multi<T>>
. This would allow more control, but might be more cumbersome to use.WDYT @FroMage @stuartwdouglas ?
https://github.com/quarkusio/quarkus/issues/20100
$upstream:20100$