using Newtonsoft.Json; using System.Net.Http; using System.Threading.Tasks; namespace Timeline.Tests.Helpers { public static class ResponseExtensions { public static async Task ReadBodyAsJson(this HttpResponseMessage response) { return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync()); } } }