Skip to content
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

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

Open
rob-bygrave opened this issue Apr 12, 2023 · 1 comment

Comments

@rob-bygrave
Copy link
Contributor

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.

@bbeaupain
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants