I am using the below code snippet:
public async Task<LoginUser[]> GetUserAsync()
{
var client = new System.Net.Http.HttpClient();
client.BaseAddress =
new Uri("http://developer-platform.com/dutyfreebuzz/web_services/Login");
StringContent str = new StringContent("username=admin&password=12345", Encoding.UTF8, "application/x-www-form-urlencoded");
var response = await client.PostAsync(new Uri("http://developer-platform.com/dutyfreebuzz/web_services/Login/loginJSON"), str);
var loginJson = await response.Content.ReadAsStringAsync();
Rootobject rootobject = new Rootobject();
if (loginJson != "")
{
//rootobject = JsonConvert.DeserializeObject<Rootobject>(loginJson);
}
//return rootobject.loginusers;
}
I have set the breakpoint to this function. During execution, the debugger is not moving to
PostAsync
call and it is moving out of the function.