-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Clarify use of Multi as return type in RESTEasy Reactive #14183
Comments
/cc @FroMage, @stuartwdouglas |
Technically, we can stream json arrays too, as long as we start with We could just do that and call it a day. Then it's up to the client to figure out if it wants to stream or not. |
+1 If someone tells me how this should be done, I will be happy to implement it (well, reuse the code I wrote for reactive routes). |
#14214 should fix this. |
Yes, let's close it |
Description
Currently RESTEasy Reactive always tries to "stream" a result when
Multi
is used a return type of Resource method.This can be surprising in cases like the following:
where users expect to get a JSON array as a result, but instead end up with something like
We have the following options:
Multi
always "streams") and expect users to collect the results toUni
(using.collectItems().asList()
on theMulti
)Uni
when the media type of resource method does not support streaming (for exampleapplication/json
does not stream). This may not be bullet-proof however as there is no spec mandate about which media types can and can't stream.Historical note
The discussion that lead to this is here
The text was updated successfully, but these errors were encountered: