示例#1
0
        private static async Task HandleStatusCodeException(HttpContext context, ApiException ex)
        {
            context.Response.ContentType = "application/json";
            context.Response.StatusCode  = (int)ex.StatusCode;

            await context.Response.WriteAsync(ex.ToJson());
        }