httpClient.post().uri(getSearchUrl())
.send(Mono.just(Unpooled.wrappedBuffer(bytes)))
.responseSingle((resp, buf) -> {
return buf;
})
.map(ByteBuf::retain)
.map(byteBuf -> {
response.setResponseBodyStream(new ByteBufInputStream(byteBuf, true));
return response;
});
In the method responseSingle
,the respone is already uncompressed.
So how can I get the length of compressed response? Thanks.