-5
I have the code below, how would be the correct route? How can I test the call
//http://localhost:1608/api/ApiCidade/consulta/clienteLoginSenha/
[HttpGet]
// [Route("consulta/clienteLoginSenha/{email:long}/{senha:long}")]
[Route("consulta/clienteLoginSenha/email{email}/senha/{senha}")]
public HttpResponseMessage ClientePorLoginSenha(string email, string senha)
{
try
{
var tCliente = new ClienteAplicacao();
var listarDeClientes = tCliente.ListarPorLoginSenha(email,senha);
return Request.CreateResponse(HttpStatusCode.OK, listarDeClientes.ToArray());
}
catch (Exception ex)
{
return Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message);
}
}
How do you want the route to be? What error are you currently encountering?
– carlosfigueira
I made a test with the two routes that I am putting in question, the two generates an error
– Harry
Which error returns? tries to detail more
– Ricardo
the route looks like this : [Route("query/clientLoginSenha/{email}/{password}")] is for testing : http://localhost:1608/api/Apicity/query/clientLoginSend/[email protected]/test
– Harry