Replies: 1 comment
-
|
I'd really appreciate it if someone could help explain this to me. I've tried running Quarkus in a debugger to find out where record HeadersAndInputStream(MultivaluedMap<String, String> headers, InputStream bodyStream) {}to no avail. I mean, it works, but it seems to consume the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Related to #50813: how can I stream the response body using a JAX-RS
Client, while also accessing the response headers?Context: I am trying to build a resource that fetches a (potentially large) file from another service, and send that document to clients in the resource's response. One of the things I want to achieve is to minimize resource utilization during this operation (so no slurping the entire response into memory).
My current experiment looks like this:
This "works", as in I'm only using an 8KiB buffer per request to this endpoint, but I have no access to the response headers from the upstream service. Is there a way to combine this streaming approach with the ability to see the response headers?
EDIT: fixed issue where I'd write the full buffer even if fewer bytes were read from the
InputStream.Beta Was this translation helpful? Give feedback.
All reactions