1

How to create a sub resource in restlet

1- I want to have two @Get annotated method in same resource 2- I want to assign each method a URI

Nishant Modi
  • 669
  • 1
  • 6
  • 19

1 Answers1

0

In fact, this can only be done using the JAX-RS support of Restlet. For the native REST support (classes that extend ServerResource) they can be attached to a single path. I mean every annotated methods in the server resource will be called on the same path.

That said you can define several @Get methods in a same server resource but the routing will be done based on media types or query parameters.

Hope it answers your question. Thierry

Thierry Templier
  • 198,364
  • 44
  • 396
  • 360