My API is calling REST API using RestSharp and Code looks like this
var runRequest = { Contains my JSON}
var client = new RestClient(".....");
var request = new RestRequest("....", Method.Post);
string AuthHeader = "...";
request.AddParameter("application/json", runRequest, ParameterType.RequestBody);
request.AddParameter("Authorization", "Bearer " + AuthHeader, ParameterType.HttpHeader);
var response = client.Execute(request); <---- {Red line showing under client}
return Ok(response);
Error
Because of that red line, I am not able to run my program. Can somebody please tell what the issue can be ?
Thank you

ExecuteAsync. When you type "client. ", what does Visual Studio show you in intellisense as available methods?client.Execute(request).Result. At best this will be an abuse of async benefits, at worst you risk deadlocking a thread. If it is at all an option, I suggest refactoring for async.