示例#1
0
 public async Task <DeleteResult> DeleteStorageAsync(Guid fileId)
 {
     using (var request = new HttpRequestMessage(HttpMethod.Delete, UrlHelper.ApiFilesStorage(fileId)))
     {
         return(await ExecuteRequestAsync <DeleteResult>(this._httpClient, request).ConfigureAwait(false));
     }
 }
示例#2
0
        public async Task DeleteAsync(IEnumerable <Guid> imageIds)
        {
            using (var request = new HttpRequestMessage(HttpMethod.Delete, UrlHelper.ApiFilesStorage()))
            {
                request.Content = new StringContent(JsonConvert.SerializeObject(imageIds), Encoding.UTF8, "application/json");

                await ExecuteRequestAsync(this._httpClient, request).ConfigureAwait(false);
            }
        }
示例#3
0
        public async Task <StoreResult> StoreAsync(Guid imageId)
        {
            using (var request = new HttpRequestMessage(HttpMethod.Put, UrlHelper.ApiFilesStorage()))
            {
                request.Content = new StringContent(JsonConvert.SerializeObject(imageId), Encoding.UTF8, "application/json");

                return(await ExecuteRequestAsync <StoreResult>(this._httpClient, request).ConfigureAwait(false));
            }
        }