Introduction to RESTful Web Services – RESTful Web Services Tutorial

2 years ago Lalit Bhagtani 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 URI. These resources can be represent in various forms like Text, JSON and XML. REST was first introduced by Roy Fielding in 2000.

In REST based architecture, you typically have two components :-

  1. REST Server :- It provides access to the resources by exposing their URIs.
  2. REST Client :- It access and modifies the resources by using HTTP protocol for communication.

RESTFul Web Services

RESTful Web Services :- 

A web service is a standardized way of integrating web-based applications using open standards like SOAP, WSDL, UDDI over an internet. Software applications written in different programming languages and running on different platforms can use web services for exchanging or communicating data.

Web services based on REST architecture style are known as RESTful Web Services. These web services use HTTP methods ( POST, GET, PUT, DELETE, OPTIONS ) to implement the concepts of REST. It defines URI ( Uniform Resource Identifier ) for the resources and can provide different resource representation like XML, text and JSON.

HTTP Methods :- 

The HTTP methods that are commonly used in REST based architecture are as follows :-

  1. GET :- It provides a read only access to a resource (idempotent).
  2. PUT :- It creates a new resource or update/replace an existing resource. (idempotent).
  3. POST :- It updates an existing resource or create a new resource.
  4. DELETE :- It delete the resources (idempotent).
  5. HEAD :- It gets the response status and HTTP header information without message body.
  6. OPTIONS :- It gets the supported operations on a resource.

idempotent :- If an operation is repeated multiple times for same set of values, produces the same result then that operation is known as idempotent.

References :-

  1. RESTful Web Service Docs

That’s all for Introduction to RESTful Web Services. If you liked it, please share your thoughts in comments section and share it with others too.