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.
- }
- }
- }
Salman BegPosted Dec 16, 2019, 4:12 AM
AshokPosted Dec 16, 2019, 4:01 AM
Salman BegPosted Dec 16, 2019, 3:48 AM
AshokPosted Dec 16, 2019, 3:43 AM
Salman BegPosted Dec 16, 2019, 3:06 AM
AshokPosted Dec 16, 2019, 2:36 AM
Salman BegPosted Dec 9, 2019, 8:38 AM
Ashutosh GuptaPosted Dec 9, 2019, 5:47 AM
AshokPosted Dec 9, 2019, 4:51 AM
Ashutosh GuptaPosted Dec 5, 2019, 2:57 AM