Table of Contents

WriteBodyAsync Method

Definition

Namespace
Cuemon.Extensions.AspNetCore.Http
Assemblies
Cuemon.Extensions.AspNetCore.dll
Source
src/Cuemon.Extensions.AspNetCore/Http/HttpResponseExtensions.cs

WriteBodyAsync(HttpResponse, Func<byte[]>)

Asynchronously writes a sequence of bytes to the response body stream and advances the current position within this stream by the number of bytes written.

public static Task WriteBodyAsync(this HttpResponse response, Func<byte[]> body)

Parameters

response HttpResponse

The HttpResponse to extend.

body Func<byte[]>

The function delegate that resolves the bytes to write.

Returns

Task

A task that represents the asynchronous write operation.