I'm doing Spring Data REST. Following the simple example for getting started described here: http://spring.io/guides/gs/accessing-data-rest/ I have a question I'm thinking about.
The query "curl http://localhost:8080/people/search/findByLastName?name=Baggins" will return HTTP Status 200, (OK) even if no results were found (the json will be {}). How can I make it return HTTP status 404 instead (when no result were found).
The documentation only mentions the standard status codes: http://docs.spring.io/spring-data/rest/docs/current/reference/html/#repository-resources
Aucun commentaire:
Enregistrer un commentaire