Created
August 15, 2021 14:39
-
-
Save SibeeshVenu/79b3004ee97c61d112100e8324a0e7fb 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
static async Task MyAPIGet(HttpClient cons) | |
{ | |
using (cons) | |
{ | |
HttpResponseMessage res = await cons.GetAsync("api/tblTags/2"); | |
res.EnsureSuccessStatusCode(); | |
if (res.IsSuccessStatusCode) | |
{ | |
tblTag tag = await res.Content.ReadAsAsync<tblTag>(); | |
Console.WriteLine("\n"); | |
Console.WriteLine("---------------------Calling Get Operation------------------------"); | |
Console.WriteLine("\n"); | |
Console.WriteLine("tagId tagName tagDescription"); | |
Console.WriteLine("-----------------------------------------------------------"); | |
Console.WriteLine("{0}\t{1}\t\t{2}", tag.tagId, tag.tagName, tag.tagDescription); | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment