public class DecodingClient extends SimpleDecoratingHttpClient
DecoratingClient that requests and decodes HTTP encoding (e.g., gzip) that has been applied to the
content of an HttpResponse.| Modifier and Type | Method and Description |
|---|---|
HttpResponse |
execute(ClientRequestContext ctx,
HttpRequest req)
|
static Function<? super HttpClient,DecodingClient> |
newDecorator()
Creates a new
DecodingClient decorator with the default encodings of 'gzip' and 'deflate'. |
static Function<? super HttpClient,DecodingClient> |
newDecorator(Iterable<? extends StreamDecoderFactory> decoderFactories)
Creates a new
DecodingClient decorator with the specified StreamDecoderFactorys. |
static Function<? super HttpClient,DecodingClient> |
newDecorator(StreamDecoderFactory... decoderFactories)
Creates a new
DecodingClient decorator with the specified StreamDecoderFactorys. |
as, delegate, toStringpublic static Function<? super HttpClient,DecodingClient> newDecorator()
DecodingClient decorator with the default encodings of 'gzip' and 'deflate'.public static Function<? super HttpClient,DecodingClient> newDecorator(StreamDecoderFactory... decoderFactories)
DecodingClient decorator with the specified StreamDecoderFactorys.public static Function<? super HttpClient,DecodingClient> newDecorator(Iterable<? extends StreamDecoderFactory> decoderFactories)
DecodingClient decorator with the specified StreamDecoderFactorys.public HttpResponse execute(ClientRequestContext ctx, HttpRequest req) throws Exception
ClientCopyright © 2020 LeanCloud. All rights reserved.