var keyValues = new List>
{
new KeyValuePair("username", UserName),
new KeyValuePair("password", Password),
new KeyValuePair("grant_type", "password")
};
var request = new HttpRequestMessage(HttpMethod.Post, "http://softstacksolutions.in/Token");
request.Content = new FormUrlEncodedContent(keyValues);
var client = new HttpClient();
var response = await client.SendAsync(request);
var jwt = await response.Content.ReadAsStringAsync();
JObject jwtynamic = JsonConvert.DeserializeObject(jwt);
var accessToken = jwtynamic.Value("access_token");
return accessToken;
this code works fine on simulator but faild but app crashes while this code is called
why?
Logesh PalaniPosted Feb 3, 2020, 3:40 AM