1
When is the release of an address made using the Enablecors can be used the Route or is it necessary to change something? is correct this way?
[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);
}
}