public async Task <IActionResult> SendData(string url, string data, string method) { var model = String.Empty; switch (method) { case "Get": model = await _httpHelper.GetAsync(url); break; case "Post": model = await _httpHelper.PostAsync(url, data); break; case "Put": model = await _httpHelper.PutAsync(url, data); break; case "Delete": model = await _httpHelper.DeleteAsync(url); break; } return(View("Index", model)); }