public static async Task WriteJsonAsync(this HttpResponse response, object o, string contentType = null)
        {
            var json = ObjectSerializer.ToString(o);
            await response.WriteJsonAsync(json, contentType);

            await response.Body.FlushAsync();
        }
Beispiel #2
0
 public static async Task WriteJsonAsync(this HttpResponse response, object o)
 {
     var json = ObjectSerializer.ToString(o);
     await response.WriteJsonAsync(json);
 }