I have implemeted simple routing:
return RouterFunctions
.nest(path("/api/person"),
route(GET("/"), personService::findAllPeople)
.andRoute(GET("/{id}"), personService::findOnePerson)
.andRoute(POST("/add"), personService::addPerson)
.andRoute(DELETE("/delete/{id}"), personService::deletePerson)
.andRoute(PUT("/update"), personService::updatePerson));
The most interesting method is DELETE
becuase it only works via Postman
. When I try to type /api/person/delete/1
in browser it throws 404
with none errors in console - does anyone know why? In Postman I disabled all headers which are sent and still Postman works, browser not.