Hi,
Thanks in advance :)
- readonly string Baseurl = "http://localhost:123456/";
- public string GetUserID_By_UserName(string Username)
- {
- string UserName = "";
- using (HttpClient client = new HttpClient())
- {
- client.BaseAddress = new Uri(Baseurl);
- client.DefaultRequestHeaders.Clear();
- client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
- try
- {
- var response = client.GetAsync("api/Values/UserID_By_UserName?username=" + Username).Result;
- // Here how i can check the api is working or not how to get the status to display of the api.
- }
- }
- }

Ashutosh GuptaRank #805 · 2.9K reputationPosted Dec 4, 2019, 9:57 PM EST
Salman BegRank #284 · 8.8K reputationPosted Dec 9, 2019, 3:38 AM EST
AshokRank #2,671 · 521 reputationPosted Dec 8, 2019, 11:51 PM EST
Ashutosh GuptaRank #805 · 2.9K reputationPosted Dec 9, 2019, 12:47 AM EST
AshokRank #2,671 · 521 reputationPosted Dec 15, 2019, 9:36 PM EST
Salman BegRank #284 · 8.8K reputationPosted Dec 15, 2019, 10:06 PM EST
AshokRank #2,671 · 521 reputationPosted Dec 15, 2019, 10:43 PM EST
Salman BegRank #284 · 8.8K reputationPosted Dec 15, 2019, 10:48 PM EST
AshokRank #2,671 · 521 reputationPosted Dec 15, 2019, 11:01 PM EST
Salman BegRank #284 · 8.8K reputationPosted Dec 15, 2019, 11:12 PM EST