Created
August 15, 2021 14:40
-
-
Save SibeeshVenu/84ff6853fec53f7b93345170be8050bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async Task MyAPIDelete(HttpClient cons) | |
{ | |
using (cons) | |
{ | |
HttpResponseMessage res = await cons.GetAsync("api/tblTags/2"); | |
res.EnsureSuccessStatusCode(); | |
if (res.IsSuccessStatusCode) | |
{ | |
res = await cons.DeleteAsync("api/tblTags/2"); | |
Console.WriteLine("\n"); | |
Console.WriteLine("\n"); | |
Console.WriteLine("-----------------------------------------------------------"); | |
Console.WriteLine("------------------Calling Delete Operation--------------------"); | |
Console.WriteLine("------------------Deleted-------------------"); | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment