Table of Contents

Handle Method

Definition

Handle<T>(HttpRequest, HttpResponse, T, CancellationToken)

Serializes the specified model and writes it to the HTTP response body.

public virtual Task Handle<T>(HttpRequest req, HttpResponse res, T model, CancellationToken cancellationToken)

Parameters

req HttpRequest

The current HttpRequest.

res HttpResponse

The current HttpResponse to which the serialized content is written.

model T

The model to serialize.

cancellationToken CancellationToken

A CancellationToken used to propagate notification that the operation should be canceled.

Returns

Task

A Task that represents the asynchronous write operation.

Type Parameters

T

The type of the model to serialize.