Return query with more than 1 parameter in WebAPI

-4

I have the code below, how would the correct route look? 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);
            }
        }
    
asked by anonymous 06.11.2015 / 18:54

1 answer

0

The answer:

a rota ficou assim : 
[Route("consulta/clienteLoginSenha/{email}/{senha}")]
é para testar : http://localhost:1608/api/ApiCidade/consulta/clienteLoginSenha/[email protected]/teste
    
09.11.2015 / 02:36