WriteBodyAsync Method
Definition
- Namespace
- Cuemon.Extensions.AspNetCore.Http
- Assemblies
- Cuemon.Extensions.AspNetCore.dll
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
responseHttpResponseThe HttpResponse to extend.
bodyFunc<byte[]>The function delegate that resolves the bytes to write.
Returns
- Task
A task that represents the asynchronous write operation.