When you are done releasing an address using EnableCors can you use Route or do you need to change anything? is this correct?
[HttpGet]
[Route("consulta/BuscaTipoPagamento")]
[EnableCors(origins: "http://localhost:50907", headers: "*", methods: "*")]
public HttpResponseMessage BuscaTipoPagamento()
{
try
{
var tTabela = new TipoPagamentoAplicacao();
var listar = tTabela.ListaTodos();
return Request.CreateResponse(HttpStatusCode.OK,
new { pagamento = listar.ToArray() });
}
catch (Exception ex)
{
return Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message);
}
}