Hi
I am getting error - Using the generic type JsonResult<T> requires 1 type arguments.
public JsonResult GetCourier(string token, Int32 origin, Int32 destination) { var client = new RestClient("htts://api.nimbuspost.com/v1/courier"); client.Timeout = -1; var request = new RestRequest(Method.GET); request.AddHeader("Content-Type", "application/json"); request.AddHeader("Authorization", "Bearer " + token); request.AddParameter("origin", origin, ParameterType.RequestBody); request.AddParameter("destination", destination, ParameterType.RequestBody); request.AddHeader("content-type", "application/json"); IRestResponse response = client.Execute(request); Root root = JsonConvert.DeserializeObject<Root>(response.Content); return Json(new { status = root.status, response = root }); }
Thanks