StaticFileOptions.OnPrepareResponse 属性

定义

在设置状态代码和标头之后而在写入正文之前调用。 这可用于添加或更改响应标头。

public:
 property Action<Microsoft::AspNetCore::StaticFiles::StaticFileResponseContext ^> ^ OnPrepareResponse { Action<Microsoft::AspNetCore::StaticFiles::StaticFileResponseContext ^> ^ get(); void set(Action<Microsoft::AspNetCore::StaticFiles::StaticFileResponseContext ^> ^ value); };
public Action<Microsoft.AspNetCore.StaticFiles.StaticFileResponseContext> OnPrepareResponse { get; set; }
member this.OnPrepareResponse : Action<Microsoft.AspNetCore.StaticFiles.StaticFileResponseContext> with get, set
Public Property OnPrepareResponse As Action(Of StaticFileResponseContext)

属性值

注解

OnPrepareResponse 在 之前 OnPrepareResponseAsync调用 。

适用于