Response streaming between JAX-RS and Web-Components (Part 2)

In part one we had a look at a JAX-RS endpoint that streams its content to the requesting client. Now I’d like to show how the fetch-API can be used to consume that streamed content in a web component. ...

July 28, 2019 · 4 min · schoeffm

Response streaming between JAX-RS and Web-Components (Part 1)

When dealing with JAX-RS resources are normally assembled completely in memory before being put onto the wire for transmission. If the resulting response fits into one single chunk the transmission is accomplished in one go - if the content is bigger than 16kB it will be split into several chunks of that size. You can see the difference in the response headers where a one-go-transmission contains the Content-Length-header (where the server announces the size of the content to be transmitted) while a chunked transmission lacks the Content-Length header but contains a Transfer-Encoding: chunked header. ...

July 27, 2019 · 3 min · schoeffm