Class DecodingClientBuilder
java.lang.Object
com.linecorp.armeria.client.encoding.DecodingClientBuilder
A builder class for
DecodingClient
.-
Method Summary
Modifier and TypeMethodDescriptionautoFillAcceptEncoding(boolean autoFillAcceptEncoding)
Automatically fills possibleHttpHeaderNames.ACCEPT_ENCODING
s specified indecoderFactories(StreamDecoderFactory...)
if anHttpHeaderNames.ACCEPT_ENCODING
is not set inRequestHeaders
.build(HttpClient delegate)
Returns a newly-createdDecodingClient
based on the properties of this builder.decoderFactories(StreamDecoderFactory... decoderFactories)
Sets the specifiedStreamDecoderFactory
s.decoderFactories(Iterable<? extends StreamDecoderFactory> decoderFactories)
Sets the specifiedStreamDecoderFactory
s.Function<? super HttpClient,DecodingClient>
Returns a newly-created decorator that decorates anHttpClient
with a newDecodingClient
based on the properties of this builder.strictContentEncoding(boolean strict)
Strictly validatesHttpHeaderNames.CONTENT_ENCODING
.
-
Method Details
-
decoderFactories
Sets the specifiedStreamDecoderFactory
s. If not specified,StreamDecoderFactory.gzip()
,StreamDecoderFactory.deflate()
andStreamDecoderFactory.brotli()
are used by default. -
decoderFactories
public DecodingClientBuilder decoderFactories(Iterable<? extends StreamDecoderFactory> decoderFactories)Sets the specifiedStreamDecoderFactory
s. If not specified,StreamDecoderFactory.gzip()
,StreamDecoderFactory.deflate()
andStreamDecoderFactory.brotli()
are used by default. -
autoFillAcceptEncoding
Automatically fills possibleHttpHeaderNames.ACCEPT_ENCODING
s specified indecoderFactories(StreamDecoderFactory...)
if anHttpHeaderNames.ACCEPT_ENCODING
is not set inRequestHeaders
. This option is enabled by default. -
strictContentEncoding
Strictly validatesHttpHeaderNames.CONTENT_ENCODING
. If an unsupportedHttpHeaderNames.CONTENT_ENCODING
is received, theHttpResponse
will be failed withUnsupportedEncodingException
.This option is disabled by default. That means if an unsupported
HttpHeaderNames.CONTENT_ENCODING
is received, the decoding for the content will be skipped. -
newDecorator
Returns a newly-created decorator that decorates anHttpClient
with a newDecodingClient
based on the properties of this builder. -
build
Returns a newly-createdDecodingClient
based on the properties of this builder.
-