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(); }
public static async Task WriteJsonAsync(this HttpResponse response, object o) { var json = ObjectSerializer.ToString(o); await response.WriteJsonAsync(json); }