/// <summary> /// コンテナ削除 /// </summary> /// <param name="containerName"></param> /// <returns></returns> public async Task <HttpResponseMessage> DeleteContainer(string containerName) { var result = await WebExtension.Delete($"{BaseUrl}/{containerName}", authToken : KeyStone.Token); if (result.StatusCode != System.Net.HttpStatusCode.NoContent) { throw new HttpRequestException(await result.Content.ReadAsStringAsync()); } return(result); }
public async Task <HttpResponseMessage> DeleteObject(string containerName, string fileName, IDictionary <string, string> headers = null) { var result = await WebExtension.Delete($"{BaseUrl}/{containerName}/{fileName}", authToken : KeyStone.Token, headers : headers); switch (result.StatusCode) { case HttpStatusCode.NoContent: case HttpStatusCode.NotFound: break; default: throw new HttpRequestException(await result.Content.ReadAsStringAsync()); } return(result); }