KestrunResponse.WriteResponseAsync method (1 of 2)

Asynchronously writes a response with the specified input object and HTTP status code.

public Task WriteResponseAsync(WriteObject inputObject)
parameter description
inputObject The object to be sent in the response body.

Return Value

A task that represents the asynchronous write operation.

See Also


KestrunResponse.WriteResponseAsync method (2 of 2)

Asynchronously writes a response with the specified input object and HTTP status code. Chooses the response format based on the Accept header or defaults to text/plain.

public Task WriteResponseAsync(object? inputObject, int statusCode = 200)
parameter description
inputObject The object to be sent in the response body.
statusCode The HTTP status code for the response.

Return Value

A task that represents the asynchronous write operation.

See Also