Пример #1
0
        public static List <T> GetCollection <T>(this HttpResponseMessage responseMessage)
        {
            var response = responseMessage.Content.ReadAsStringAsync().Result;

            return(ClientSerializer.Deserialize <List <T> >(response));
        }
Пример #2
0
        public static async Task <IReadOnlyCollection <T> > GetCollectionAsync <T>(this HttpResponseMessage responseMessage)
        {
            var response = await responseMessage.Content.ReadAsStringAsync();

            return(ClientSerializer.Deserialize <IReadOnlyCollection <T> >(response));
        }
Пример #3
0
        public static T GetObject <T>(this HttpResponseMessage responseMessage)
        {
            var response = responseMessage.Content.ReadAsStringAsync().Result;

            return(ClientSerializer.Deserialize <T>(response));
        }
Пример #4
0
        public static async Task <T> GetObjectAsync <T>(this HttpResponseMessage responseMessage)
        {
            var response = await responseMessage.Content.ReadAsStringAsync();

            return(ClientSerializer.Deserialize <T>(response));
        }