public async Task DeleteFile(string shareName, string fileName) { HttpRequestMessage request = FileTests.DeleteFileRequest(FileContext, shareName, fileName, null); Assert.IsTrue(request != null, "Failed to create HttpRequestMessage"); HttpResponseMessage response = await FileTestUtils.GetResponse(request, FileContext); response.Dispose(); }
public void DeleteFile(string shareName, string fileName) { HttpWebRequest request = FileTests.DeleteFileRequest(FileContext, shareName, fileName, null); Assert.IsTrue(request != null, "Failed to create HttpWebRequest"); if (FileContext.Credentials != null) { FileTests.SignRequest(request, FileContext); } HttpWebResponse response = FileTestUtils.GetResponse(request, FileContext); response.Close(); }