Top Description Inners Methods
org.springframework.http.codec

public Interface ClientCodecConfigurer

extends CodecConfigurer
Known Direct Implementers
org.springframework.http.codec.support.DefaultClientCodecConfigurer
Imports
org.springframework.core.codec.Decoder

Extension of CodecConfigurer for HTTP message reader and writer options relevant on the client side.

HTTP message readers for the following are registered by default:

HTTP message writers registered by default:

Author
Rossen Stoyanchev
Since
5.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Method Summary

Modifier and TypeMethod and Description
public ClientCodecConfigurer
public static ClientCodecConfigurer
create()

Static factory method for a ClientCodecConfigurer.

public ClientCodecConfigurer.ClientDefaultCodecs
defaultCodecs()

Redeclares org.springframework.http.codec.CodecConfigurer.defaultCodecs.

Provides a way to customize or replace HTTP message readers and writers registered by default.

Inherited from org.springframework.http.codec.CodecConfigurer:
customCodecsgetReadersgetWritersregisterDefaults

Method Detail

cloneback to summary
public ClientCodecConfigurer clone()

Redeclares org.springframework.http.codec.CodecConfigurer.clone.

Doc from org.springframework.http.codec.CodecConfigurer.clone.

Create a copy of this CodecConfigurer. The returned clone has its own lists of default and custom codecs and generally can be configured independently. Keep in mind however that codec instances (if any are configured) are themselves not cloned..

Annotations
@Override
createback to summary
public static ClientCodecConfigurer create()

Static factory method for a ClientCodecConfigurer.

defaultCodecsback to summary
public ClientCodecConfigurer.ClientDefaultCodecs defaultCodecs()

Redeclares org.springframework.http.codec.CodecConfigurer.defaultCodecs.

Doc from org.springframework.http.codec.CodecConfigurer.defaultCodecs.

Provides a way to customize or replace HTTP message readers and writers registered by default.

On the client side, built-in default also include customizations related to multipart readers and writers, as well as the decoder for SSE.

Annotations
@Override
org.springframework.http.codec back to summary

public Interface ClientCodecConfigurer.ClientDefaultCodecs

extends DefaultCodecs
Known Direct Implementers
org.springframework.http.codec.support.ClientDefaultCodecsImpl

CodecConfigurer.DefaultCodecs extension with extra client-side options.

Method Summary

Modifier and TypeMethod and Description
public void
serverSentEventDecoder(Decoder<?>
the decoder to use
decoder
)

Configure the Decoder to use for Server-Sent Events.

Inherited from org.springframework.http.codec.CodecConfigurer.DefaultCodecs:
configureDefaultCodecenableLoggingRequestDetailsjackson2JsonDecoderjackson2JsonEncoderjackson2SmileDecoderjackson2SmileEncoderjaxb2Decoderjaxb2EncoderkotlinSerializationCborDecoderkotlinSerializationCborEncoderkotlinSerializationJsonDecoderkotlinSerializationJsonEncoderkotlinSerializationProtobufDecoderkotlinSerializationProtobufEncodermaxInMemorySizemultipartCodecsmultipartReaderprotobufDecoderprotobufEncoder

Method Detail

serverSentEventDecoderback to summary
public void serverSentEventDecoder(Decoder<?> decoder)

Configure the Decoder to use for Server-Sent Events.

By default if this is not set, and Jackson is available, the jackson2JsonDecoder override is used instead. Use this method to customize the SSE decoder.

Note that maxInMemorySize(int), if configured, will be applied to the given decoder.

Parameters
decoder:Decoder<?>

the decoder to use