API

HttpResponse.OnStarting

Registers a callback before response headers are sent.

Formal Syntax & Structure

csharp syntaxcsharp
ctx.Response.OnStarting(() => Task.CompletedTask);

Working Example

Example Snippetcsharp
// Documentary fragment; see linked lesson for context.ctx.Response.OnStarting(() => Task.CompletedTask);
C# & .NET Reference