示例#1
0
        public async Task <IEnumerable <T> > GetItemsAsync <T>(string url, Dictionary <string, string> parameters, bool forceRefresh = false)
        {
            var completeUrl = $"{url}{HttpHelper.ParseQueryParams(parameters)}";

            return(await HttpHelper.SendRequestAsync <T[]>(completeUrl, HttpMethod.Get));
        }
示例#2
0
 public async Task <T> AddItemAsync <T>(string url, T item)
 {
     return(await HttpHelper.SendRequestAsync <T>(url, HttpMethod.Post, item));
 }
示例#3
0
 public async Task <IEnumerable <T> > GetItemsAsync <T>(string url, bool forceRefresh = false)
 {
     return(await HttpHelper.SendRequestAsync <T[]>(url, HttpMethod.Get));
 }
示例#4
0
        public async Task <ValidationResultDto> ValidateAsync(string url, Dictionary <string, string> parameters)
        {
            var query = $"{url}{HttpHelper.ParseQueryParams(parameters)}";

            return(await HttpHelper.SendRequestAsync <ValidationResultDto>(query, HttpMethod.Get));
        }
示例#5
0
        public async Task <bool> ExistsAsync(string url, Dictionary <string, string> parameters)
        {
            var query = $"{url}{HttpHelper.ParseQueryParams(parameters)}";

            return(await HttpHelper.SendRequestAsync <bool>(query, HttpMethod.Get));
        }
示例#6
0
        public async Task <T> GetItemAsync <T>(string url, Dictionary <string, string> parameters)
        {
            var completeUrl = $"{url}{HttpHelper.ParseQueryParams(parameters)}";

            return(await HttpHelper.SendRequestAsync <T>(completeUrl, HttpMethod.Get));
        }
示例#7
0
 public async Task <T> GetItemAsync <T>(string url, string id)
 {
     return(await HttpHelper.SendRequestAsync <T>($"{url}/{id}", HttpMethod.Get));
 }