Class DecodingClient
java.lang.Object
com.linecorp.armeria.common.util.AbstractUnwrappable<Client<T_I,T_O>>
com.linecorp.armeria.client.DecoratingClient<I,O,I,O>
com.linecorp.armeria.client.SimpleDecoratingClient<HttpRequest,HttpResponse>
com.linecorp.armeria.client.SimpleDecoratingHttpClient
com.linecorp.armeria.client.encoding.DecodingClient
- All Implemented Interfaces:
Client<HttpRequest,
,HttpResponse> HttpClient
,Unwrappable
A
DecoratingClient
that requests and decodes HTTP encoding (e.g., gzip) that has been applied to the
content of an HttpResponse
.
Note that if a decoded content exceeds ClientRequestContext.maxResponseLength()
,
a ContentTooLargeException
will be raised.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DecodingClientBuilder
builder()
Returns a newDecodingClientBuilder
.execute
(ClientRequestContext ctx, HttpRequest req) static Function<? super HttpClient,
DecodingClient> Creates a newDecodingClient
decorator with the default encodings of 'gzip' and 'deflate'.static Function<? super HttpClient,
DecodingClient> newDecorator
(StreamDecoderFactory... decoderFactories) Creates a newDecodingClient
decorator with the specifiedStreamDecoderFactory
s.static Function<? super HttpClient,
DecodingClient> newDecorator
(Iterable<? extends StreamDecoderFactory> decoderFactories) Creates a newDecodingClient
decorator with the specifiedStreamDecoderFactory
s.Methods inherited from class com.linecorp.armeria.common.util.AbstractUnwrappable
as, toString, unwrap, unwrapAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.linecorp.armeria.common.util.Unwrappable
equalsIgnoreWrapper, unwrapAll
-
Method Details
-
newDecorator
Creates a newDecodingClient
decorator with the default encodings of 'gzip' and 'deflate'. -
newDecorator
public static Function<? super HttpClient,DecodingClient> newDecorator(StreamDecoderFactory... decoderFactories) Creates a newDecodingClient
decorator with the specifiedStreamDecoderFactory
s. -
newDecorator
public static Function<? super HttpClient,DecodingClient> newDecorator(Iterable<? extends StreamDecoderFactory> decoderFactories) Creates a newDecodingClient
decorator with the specifiedStreamDecoderFactory
s. -
builder
Returns a newDecodingClientBuilder
. -
execute
Description copied from interface:Client
-