TestResponseBody constructor
TestResponseBody(
- HttpClientResponse response
Creates a new instance of this type.
Instances of this type decode response
's body based on its content-type.
See CodecRegistry
for more information about how data is decoded.
Decoded data is cached the after it is decoded.
Implementation
TestResponseBody(HttpClientResponse response)
: _response = response,
super(response) {
_hasContent = (response.headers.contentLength) > 0 ||
response.headers.chunkedTransferEncoding;
}