Handle Method
Definition
- Namespace
- Codebelt.Extensions.Carter.Response
- Assemblies
- Codebelt.Extensions.Carter.dll
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
reqHttpRequestThe current HttpRequest.
resHttpResponseThe current HttpResponse to which the serialized content is written.
modelTThe model to serialize.
cancellationTokenCancellationTokenA CancellationToken used to propagate notification that the operation should be canceled.
Returns
Type Parameters
TThe type of the model to serialize.