IEndpointResult - PjMitchell/Easy.Endpoints GitHub Wiki

public interface IEndpointResult
{
    ValueTask ExecuteResultAsync(HttpContext context, EndpointOptions options);
}

Some predefined helpers are available

EndpointResult.Completed()

Indicates that no further modification of the context is required by the endpoint

EndpointResult.StatusCode(int statusCode)

Just updates the status code. Note you cannot use this after writing to the HttpContext body

EndpointResult.Ok<T>(T body)

Ok, with json body

EndpointResult.Json<T>(T body, int statusCode)

Json body with specific status code