Table of Contents

OnStarting Method

Definition

OnStarting(Func<object, Task>, object)

Registers a callback to be invoked just before the response starts. This is the last chance to modify the Headers, StatusCode, or ReasonPhrase.

public override void OnStarting(Func<object, Task> callback, object state)

Parameters

callback Func<object, Task>

The callback to invoke when starting the response.

state object

The state to pass into the callback.