StaticFileOptions.OnPrepareResponseAsync Propiedad

Definición

Se llama después de establecer el código de estado y los encabezados, pero antes de escribir el cuerpo. Se puede usar para agregar o cambiar los encabezados de respuesta.

public Func<Microsoft.AspNetCore.StaticFiles.StaticFileResponseContext,System.Threading.Tasks.Task> OnPrepareResponseAsync { get; set; }
member this.OnPrepareResponseAsync : Func<Microsoft.AspNetCore.StaticFiles.StaticFileResponseContext, System.Threading.Tasks.Task> with get, set
Public Property OnPrepareResponseAsync As Func(Of StaticFileResponseContext, Task)

Valor de propiedad

Comentarios

OnPrepareResponse se llama a antes de OnPrepareResponseAsync.

Se aplica a