Interface HttpConfig
- All Superinterfaces:
Prototype.Api
- All Known Subinterfaces:
Http1ClientProtocolConfig, io.helidon.webclient.http1.Http1ClientProtocolConfigBlueprint, Http1Config, io.helidon.webserver.http1.Http1ConfigBlueprint, Http2ClientProtocolConfig, io.helidon.webclient.http2.Http2ClientProtocolConfigBlueprint, Http2Config, io.helidon.webserver.http2.Http2ConfigBlueprint
- All Known Implementing Classes:
Http1ClientProtocolConfig.BuilderBase.Http1ClientProtocolConfigImpl, Http1Config.BuilderBase.Http1ConfigImpl, Http2ClientProtocolConfig.BuilderBase.Http2ClientProtocolConfigImpl, Http2Config.BuilderBase.Http2ConfigImpl, HttpConfig.BuilderBase.HttpConfigImpl
Common configuration of HTTP protocol, regardless of its version.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classFluent API builder forHttpConfig.static classHttpConfig.BuilderBase<BUILDER extends HttpConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends HttpConfig>Fluent API builder base forHttpConfig. -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpConfig.Builderbuilder()Create a new fluent API builder to customize configuration.static HttpConfig.Builderbuilder(HttpConfig instance) Create a new fluent API builder from an existing instance.static HttpConfigcreate()Create a new instance with default values.static HttpConfigCreate a new instance from configuration.default HttpLogConfiglog()HTTP Log configuration.default SizeConfigure the maximum size of a decoded entity materialized in memory, includingbyte[], strings, forms, JSON, and explicitio.helidon.http.media.ReadableEntity.buffer()calls.default intConfigure the maximum allowed headers size, which must be greater than0.default booleanWhether to validate request headers.default booleanWhether to validate response headers.
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
-
maxHeadersSize
default int maxHeadersSize()Configure the maximum allowed headers size, which must be greater than0. Defaults to16384.- Returns:
- maximum headers size
-
maxBufferedEntitySize
Configure the maximum size of a decoded entity materialized in memory, includingbyte[], strings, forms, JSON, and explicitio.helidon.http.media.ReadableEntity.buffer()calls. This is a limit on input bytes, not on the size of the resulting object graph. Direct streaming reads are not limited by this setting.Defaults to
1 MiB(1,048,576 bytes). Applications that previously materialized larger entities must explicitly increase this setting. Server-sidemax-payload-sizeremains an independent limit, including for streams.- Returns:
- maximum size for an entity materialized in memory
-
validateRequestHeaders
default boolean validateRequestHeaders()Whether to validate request headers. If set to false, any request header value is accepted, otherwise request headers and known headers are validated by format (content length is always validated as it is part of protocol processing (other headers may be validated if features use them)).Defaults to
true.- Returns:
- whether to validate request headers
-
validateResponseHeaders
default boolean validateResponseHeaders()Whether to validate response headers. If set to false, any response header value is accepted, otherwise response headers and known headers are validated by format.Defaults to
true. Disabling this setting can allow invalid response header values to be written.- Returns:
- whether to validate response headers
-
log
-