コード例 #1
0
        public async Task <bool> DeleteForm(string token, string path)
        {
            HttpResponseMessage response = await _httpUtil.DeleteAsync(token, APIs.ModifiedForm(path));

            if (response == null)
            {
                return(false);
            }

            return(response.IsSuccessStatusCode);
        }
コード例 #2
0
ファイル: ApiUtil.cs プロジェクト: filinskyi/WhatBackend
        public async Task <T> DeleteAsync <T>(string url, string accessToken)
        {
            var httpResponse = await _httpUtil.DeleteAsync(url, accessToken);

            httpResponse.EnsureSuccessStatusCode();

            string stringResponse = await httpResponse.Content.ReadAsStringAsync();

            var responseModel = JsonConvert.DeserializeObject <T>(stringResponse);

            return(responseModel);
        }