Restlet implementing post with json receive and response
First, what i wanted to know is what i am doing is the right way to do it. I have a scenario where i have will receive a json request and i have to update the database with that, once the db is updated i have to respond back with the json acknowledgment. What i have done so far is create the class extending application as follows: @Override public Restlet createRoot() { // Create a router Restlet that routes each call to a // new instance of ScanRequestResource. Router router = new Router(getContext()); // Defines only one route router.attach("/request", RequestResource.class); return router;