public byte [ ] getResponseBodyAsByteArray ( ) { final ByteBuf bodyByteBuf = httpInputMessage . getBody ( ) ; final byte [ ] bytes = new byte [ bodyByteBuf . readableBytes ( ) ] ; bodyByteBuf . readBytes ( bytes ) ; return bytes ; }
Return the response body as a byte array .