Exemplo n.º 1
0
        public HttpResponseMessage Get(string cep)
        {
            ViaCepDTO cepDTO = service.GetCep(cep);

            if (cepDTO.bairro == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NotFound));
            }
            return(Request.CreateResponse(HttpStatusCode.OK, cepDTO));
        }