RequestFormReaderExtensions.ReadFormAsync(HttpRequest, FormOptions, CancellationToken) Method

Definition

Read the request body as a form with the given options. These options will only be used if the form has not already been read.

public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IFormCollection> ReadFormAsync (this Microsoft.AspNetCore.Http.HttpRequest request, Microsoft.AspNetCore.Http.Features.FormOptions options, System.Threading.CancellationToken cancellationToken = default);
static member ReadFormAsync : Microsoft.AspNetCore.Http.HttpRequest * Microsoft.AspNetCore.Http.Features.FormOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Http.IFormCollection>
<Extension()>
Public Function ReadFormAsync (request As HttpRequest, options As FormOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IFormCollection)

Parameters

request
HttpRequest

The request.

options
FormOptions

Options for reading the form.

cancellationToken
CancellationToken

Returns

Task<IFormCollection>

The parsed form.

Applies to