public final class HttpDecodingClient 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,HttpDecodingClient> |
newDecorator()
Creates a new
HttpDecodingClient decorator with the default encodings of 'gzip' and 'deflate'. |
static Function<? super HttpClient,HttpDecodingClient> |
newDecorator(Iterable<? extends StreamDecoderFactory> decoderFactories)
Creates a new
HttpDecodingClient decorator with the specified StreamDecoderFactorys. |
static Function<? super HttpClient,HttpDecodingClient> |
newDecorator(StreamDecoderFactory... decoderFactories)
Creates a new
HttpDecodingClient decorator with the specified StreamDecoderFactorys. |
as, delegate, toStringpublic static Function<? super HttpClient,HttpDecodingClient> newDecorator()
HttpDecodingClient decorator with the default encodings of 'gzip' and 'deflate'.public static Function<? super HttpClient,HttpDecodingClient> newDecorator(StreamDecoderFactory... decoderFactories)
HttpDecodingClient decorator with the specified StreamDecoderFactorys.public static Function<? super HttpClient,HttpDecodingClient> newDecorator(Iterable<? extends StreamDecoderFactory> decoderFactories)
HttpDecodingClient decorator with the specified StreamDecoderFactorys.public HttpResponse execute(ClientRequestContext ctx, HttpRequest req) throws Exception
ClientCopyright © 2020 LeanCloud. All rights reserved.