RoutingEndpointConventionBuilderExtensions.WithFormOptions<TBuilder> Method

Definition

Configures Microsoft.AspNetCore.Http.Metadata.FormOptionsMetadata for all endpoints produced on the target IEndpointConventionBuilder.

public static TBuilder WithFormOptions<TBuilder> (this TBuilder builder, bool? bufferBody = default, int? memoryBufferThreshold = default, long? bufferBodyLengthLimit = default, int? valueCountLimit = default, int? keyLengthLimit = default, int? valueLengthLimit = default, int? multipartBoundaryLengthLimit = default, int? multipartHeadersCountLimit = default, int? multipartHeadersLengthLimit = default, long? multipartBodyLengthLimit = default) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member WithFormOptions : 'Builder * Nullable<bool> * Nullable<int> * Nullable<int64> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int> * Nullable<int64> -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function WithFormOptions(Of TBuilder As IEndpointConventionBuilder) (builder As TBuilder, Optional bufferBody As Nullable(Of Boolean) = Nothing, Optional memoryBufferThreshold As Nullable(Of Integer) = Nothing, Optional bufferBodyLengthLimit As Nullable(Of Long) = Nothing, Optional valueCountLimit As Nullable(Of Integer) = Nothing, Optional keyLengthLimit As Nullable(Of Integer) = Nothing, Optional valueLengthLimit As Nullable(Of Integer) = Nothing, Optional multipartBoundaryLengthLimit As Nullable(Of Integer) = Nothing, Optional multipartHeadersCountLimit As Nullable(Of Integer) = Nothing, Optional multipartHeadersLengthLimit As Nullable(Of Integer) = Nothing, Optional multipartBodyLengthLimit As Nullable(Of Long) = Nothing) As TBuilder

Type Parameters

TBuilder

Parameters

builder
TBuilder

The IEndpointConventionBuilder.

bufferBody
Nullable<Boolean>

Enables full request body buffering. Defaults to false.

memoryBufferThreshold
Nullable<Int32>

Configures how many bytes of the body will be buffered in memory. Defaults to 65,536 bytes, which is approximately 64KB.

bufferBodyLengthLimit
Nullable<Int64>

Limit for the total number of bytes that will be buffered. Defaults to 128MB.

valueCountLimit
Nullable<Int32>

Limit for the number of form entries to allow. Defaults to DefaultValueCountLimit.

keyLengthLimit
Nullable<Int32>

Limit on the length of individual keys. Defaults to DefaultKeyLengthLimit.

valueLengthLimit
Nullable<Int32>

Limit on the length of individual form values. Defaults to DefaultValueLengthLimit.

multipartBoundaryLengthLimit
Nullable<Int32>

Limit for the length of the boundary identifier. Defaults to 128 bytes.

multipartHeadersCountLimit
Nullable<Int32>

Limit for the number of headers to allow in each multipart section. Defaults to DefaultHeadersCountLimit.

multipartHeadersLengthLimit
Nullable<Int32>

Limit for the total length of the header keys and values in each multipart section. Defaults to DefaultHeadersLengthLimit.

multipartBodyLengthLimit
Nullable<Int64>

Limit for the length of each multipart body. Defaults to 134,217,728 bytes, which is approximately 128MB.

Returns

TBuilder

The IEndpointConventionBuilder.

Applies to