public static List <T> GetCollection <T>(this HttpResponseMessage responseMessage) { var response = responseMessage.Content.ReadAsStringAsync().Result; return(ClientSerializer.Deserialize <List <T> >(response)); }
public static async Task <IReadOnlyCollection <T> > GetCollectionAsync <T>(this HttpResponseMessage responseMessage) { var response = await responseMessage.Content.ReadAsStringAsync(); return(ClientSerializer.Deserialize <IReadOnlyCollection <T> >(response)); }
public static T GetObject <T>(this HttpResponseMessage responseMessage) { var response = responseMessage.Content.ReadAsStringAsync().Result; return(ClientSerializer.Deserialize <T>(response)); }
public static async Task <T> GetObjectAsync <T>(this HttpResponseMessage responseMessage) { var response = await responseMessage.Content.ReadAsStringAsync(); return(ClientSerializer.Deserialize <T>(response)); }