newszine

REST API Download File using Jersey 2 – RESTful Web Services Tutorial

7 years ago Lalit Bhagtani 0
REST API Download File :- In this tutorial, we will learn to download a file with JAX-RS using Jersey 2. Let’s try to understand it with an example. Example 1 :- In this example of rest api download file, we will hit this URL <base URL>/books/download/{ext}/{id} with HTTP GET method to download a book file. The value Read More

JAX-RS @Consumes with Example – RESTful Web Services Tutorial

7 years ago Lalit Bhagtani 0
In JAX-RS @Consumes annotation is used to specify the MIME media type ( input) that a resource method can consume from the client. @Consumes annotation can be applied at both class level and method level. If it is applied at the class level, all the methods in a resource will consume the specified MIME type by default and Read More

JAX-RS @Produces with Example – RESTful Web Services Tutorial

7 years ago Lalit Bhagtani 0
In JAX-RS @Produces annotation is used to specify the MIME media type ( output ) that a resource method can produce and send it back to the client. @Produces annotation can be applied at both class level and method level. If it is applied at the class level, all the methods in a resource will produce the specified Read More

REST OPTIONS method with Example – RESTful Web Services Tutorial

7 years ago Lalit Bhagtani 0
In REST OPTIONS is a method level annotation, this annotation indicates that the following method will respond to the HTTP OPTIONS request only. It is used to request, for information about the communication option available for a resource. This method allows the client of the REST API to determine, which HTTP method ( GET, HEAD, POST, PUT, DELETE Read More

REST HEAD method with Example – RESTful Web Services Tutorial

7 years ago Lalit Bhagtani 0
In REST HEAD is a method level annotation, this annotation indicates that the following method will respond to the HTTP HEAD request only. It is used to get only response status and headers information from the server but no body ( entity ). The HEAD method can be used to know, whether the resource exist on Read More

REST API DELETE method with Example – RESTful Web Services Tutorial

7 years ago Lalit Bhagtani 0
In REST API DELETE is a method level annotation, this annotation indicates that the following method will respond to the HTTP DELETE request only. It is used to delete a resource identified by requested URI. DELETE operation is idempotent which means. If you DELETE a resource then it is removed, gone forever. If you repeat the DELETE operation for Read More