Hi,
I have MVC controller like below. I need to call Web API controller from controller by passing multiple parameters.
public ActionResult Report()
{
// need to call Web API from here by passing below parameter to Web API
// Parameters need to be passed to Wev API controller: int param1,string param2,DataTable param3, string param4, string param5
return View();
}
My Web API method is like below:
public class TestController : ApiController {
[HttpGet]
public string GetJSONData(HttpRequestMessage request)
{
// here I need to get all the parameter and pass it to GetJSONData method below
return GetJSONData(param1,param2,param3,param4,param5);
}
}
Please help me to provide some example for the above.