1.

List the key annotations that are present in the JAX-RS API?

Answer»
  • @Path - This specifies the relative URI path to the REST resource.
  • @GET - This is a request method designator which is corresponding to the HTTP GET requests. They PROCESS GET requests.
  • @POST - This is a request method designator which is corresponding to the HTTP POST requests. They process POST requests.
  • @PUT - This is a request method designator which is corresponding to the HTTP PUT requests. They process PUT requests.
  • @DELETE - This is a request method designator which is corresponding to the HTTP DELETE requests. They process DELETE requests.
  • @HEAD - This is a request method designator which is corresponding to the HTTP HEAD requests. They process HEAD requests.
  • @PathParam - This is the URI path parameter that helps developers to extract the parameters from the URI and use them in the resource class/methods.
  • @QueryParam - This is the URI query parameter that helps developers extract the query parameters from the URI and use them in the resource class/methods.
  • @Produces - This specifies what MIME media types of the resource representations are produced and sent to the client as a RESPONSE.
  • @Consumes - This specifies which MIME media types of the resource representations are accepted or CONSUMED by the server from the client.


Discussion

No Comment Found