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

Response and HttpResponseBodyPart should return ByteBuf #1953

Closed
dgolombek opened this issue Apr 3, 2024 · 1 comment · Fixed by #1954
Closed

Response and HttpResponseBodyPart should return ByteBuf #1953

dgolombek opened this issue Apr 3, 2024 · 1 comment · Fixed by #1954

Comments

@dgolombek
Copy link
Contributor

Similar to #1951 , Response and HttpResponseBodyPart should optionally return ByteBufs instead of just ByteBuffer or byte[], in case the caller will be using the response data with Netty (or just cares about performance). This be much more efficient if the LazyResponseBodyPart factory is used instead of the eager variant obviously. LazyResponseBodyPart already has getBuf(), but that doesn't help when you have a full Response, and it's not part of the interface. I'll submit a patch for this as well.

dgolombek pushed a commit to dgolombek/async-http-client that referenced this issue Apr 3, 2024
NettyResponse is already dealing with ByteBufs under the hood, this
lets the caller access them cleanly. This allows callers that are
already using Netty to use AHC much more efficiently.

Fixes AsyncHttpClient#1953
@dgolombek
Copy link
Contributor Author

@hyperxpro anything I can do to help get this reviewed and merged? I have some work time to help with this project, starting with a few things we need, but then can also help with backlog of bugs or whatever else makes sense. Thanks.

hyperxpro pushed a commit that referenced this issue Apr 11, 2024
NettyResponse is already dealing with ByteBufs under the hood, this
lets the caller access them cleanly. This allows callers that are
already using Netty to use AHC much more efficiently.

Fixes #1953

Co-authored-by: David Golombek <dgolombek@mylookout.com>
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

Successfully merging a pull request may close this issue.

1 participant