You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if the the builder of an AsyncHttpClient.Request object has a Netty ByteBuf, they must first convert it to a ByteBuffer/byte[]/ByteArrayInputStream/etc to pass it in, which generally means at least one allocation and two memory copies (into the temp buffer and then back out). This is very inefficient in both memory and CPU. I propose a new NettyByteBufBody that extends NettyDirectBody and will submit a PR to that effect. Another possible approach would be to add a Request.getNettyBody() method that allowed callers to plug in anything that implemented the NettyBody interface, but that feels like a slightly more dangerous change.