Introduction to RESTful Web Services – RESTful Web Services Tutorial
5 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 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 :-
- REST Server :- It provides access to the resources by exposing their URIs.
- REST Client :- It access and modifies the resources by using HTTP protocol for communication.
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 :-
- GET :- It provides a read only access to a resource (idempotent).
- PUT :- It creates a new resource or update/replace an existing resource. (idempotent).
- POST :- It updates an existing resource or create a new resource.
- DELETE :- It delete the resources (idempotent).
- HEAD :- It gets the response status and HTTP header information without message body.
- 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.
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.