bbeaupain/hella-http

API question - Response body as byte[], any plans for OutputStream option?

Opened this issue · 1 comments

In terms of design are you looking at changing the Response body such that it supports say an OutputStream?

I could add some more details here but I am one of the maintainers of avaje-jsonb and I have recently added an optimisation to write json content to Helidon Nima http response which translates to ... write the json content from the avaje-jsonb buffer to the http server response without incurring the cost of an extra copy of the output.

The TLDR of that is that for me I'm looking for some API like write(byte[] buffer, int position, int length) [which exists on OutputStream] to support writing json content without incurring an extra copy.

This would definitely be a great feature to support, but it does have some implications on when writes are actually triggered. I'll investigate and get it on the roadmap.