RESTful Web Service

REST PUT with Example – RESTful Web Services Tutorial

4 months ago codedestine 0
In REST PUT is a method level annotation, this annotation indicates that the following method will respond to the HTTP PUT request only. It is used to create or update a resource. PUT annotated method puts a resource at a specific URI, if a resource is already present at that URI then PUT replace or update that resource and Read More

REST GET with Example – RESTful Web Services Tutorial

4 months ago codedestine 0
In REST GET is a method level annotation, this annotation indicates that the following method will respond to the HTTP GET request only. It is used to get a resource identified by requested URI. Let’s try to understand it with an example. REST GET method Example 1 :- In this example, we will hit this URL <base URL>/books Read More

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

4 months ago codedestine 0
In JAX-RS @HeaderParam annotation is used to bind HTTP request header values to the method arguments.  Let’s try to understand it with an example. Example 1 :- In this example of JAX-RS @HeaderParam, we will hit this URL <base URL>/books/chapters to print values of  “User-Agent” and “Accept-Language” parameter from the request header. Result :- Example 2 :- In Read More

Introduction to RESTful Web Services – RESTful Web Services Tutorial

4 months ago codedestine 0
What is Rest ? REST stands for Representational State Transfer. It is an architecture style, which is based on web standards. In REST architecture style, data and functionality both are considered as a resource. Each resource is identified by an Uniform Resource Identifiers ( URIs ) and are accessed/modified via a common interface using HTTP standard methods and resource Read More

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

4 months ago codedestine 0
In JAX-RS @MatrixParam annotation is used to bind matrix parameter value defined in the @Path ( URL ) expression to the method arguments. Matrix parameters are a set of “name=value” pairs separated by a semi colon “;” in URI path, for example :- URL :- <base URL>/books/query;from=10;to=100;orderBy=books Let’s try to understand it with an example. Example Read More

Introduction to JAX RS API’s – RESTful Web Services Tutorial

4 months ago codedestine 0
JAX RS stands for Java API for RESTful Web Services. It is a specification for creating RESTful Web Services in Java. These specification are defined via Java Specification Request (JSR) 311. It uses annotations to define the RESTful Web Services. Since it is a specification only, we need to use it’s implementation libraries like Jersey or RESTEasy to create RESTful Read More

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

4 months ago codedestine 0
In JAX-RS @QueryParam annotation is used to bind query parameter value defined in the @Path ( URL ) expression to the method arguments.  Let’s try to understand it with an example. Example 1 :- In this example of JAX-RS @QueryParam, we will send two query parameters ( from and to ) in the @Path expression Read More

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

4 months ago codedestine 0
In JAX-RS @PathParam annotation is used to bind parameter value defined in the @Path ( URL ) expression to the method arguments.  Let’s try to understand it with an example. Example 1 :- In this example, we will send one parameter ( book id ) in the @Path expression books/{id}. If we hit this URL <base Read More