public IActionResult CallAPI(IFormCollection form) { var nome = Request.Form["nome"]; var sobrenome = Request.Form["sobrenome"]; var cargo = Request.Form["cargo"]; var salario = Request.Form["salario"]; TableApi table = new TableApi() { Nome = nome, Sobrenome = sobrenome, Cargo = cargo, Salario = Convert.ToDouble(salario) }; var httpmodel = AuthenticationHelper.AuthenticationToken(_config); var http = httpmodel.Http; var urlBase = httpmodel._urlBase; var resp = http.PostAsJsonAsync(urlBase, table); var a = resp.Result; return(RedirectToAction("Index")); }