public void Delete()
        {
            const HTTPMethod testMethod = HTTPMethod.DELETE;
            var testRest = new RESTClient <int, int>();

            testRest.Delete();
            var actualMethod = testRest.method;

            Assert.AreEqual(testMethod, actualMethod);
        }
        public async Task <ActionResult> Delete(CandidatoViewModel model)
        {
            try
            {
                RESTClient client = new RESTClient(baseUrl);
                await client.Delete <string>($"api/Candidato/{model.Id}");

                return(View("DeleteConcluido", model.Id));
            }
            catch
            {
                return(View(model));
            }
        }