FormFeature 类

定义

的默认实现 IFormFeature

public ref class FormFeature : Microsoft::AspNetCore::Http::Features::IFormFeature
public class FormFeature : Microsoft.AspNetCore.Http.Features.IFormFeature
type FormFeature = class
    interface IFormFeature
Public Class FormFeature
Implements IFormFeature
继承
FormFeature
实现

构造函数

FormFeature(HttpRequest)

初始化 FormFeature 的新实例。

FormFeature(HttpRequest, FormOptions)

初始化 FormFeature 的新实例。

FormFeature(IFormCollection)

初始化 FormFeature 的新实例。

属性

Form

获取或设置分析的窗体。

如果使用 或 ReadForm()读取ReadFormAsync(CancellationToken)请求正文,或者显式分配了值,则此 API 将返回非 null 值。

HasFormContentType

指示请求是否具有受支持的表单内容类型。

方法

ReadForm()

将请求正文分析为窗体。

如果以前未读取请求正文,则此 API 会执行同步 (阻止) HTTP 输入流上读取,这可能不受支持,或者可能会对应用程序性能产生负面影响。 请考虑改用 ReadFormAsync(CancellationToken)

ReadFormAsync()

的默认实现 IFormFeature

ReadFormAsync(CancellationToken)

将请求正文分析为窗体。

适用于