I am using RestSharp to call REST API as
public async Task<IActionResult> getoutput()
{
var client = new RestClient("....");
var request = new RestRequest(".....");
var response = await client.ExecuteAsync(request);
return Ok(response.Content);
}
My response is like
{
"number" : 567889
}
I want to get that number 567889 and save it into variable in my controller. But I am not able to do so.
I tried with
var answer = response.Content;
But it is showing the JSON.
Can somebody please help me out?