REST is an architectural style of making web app/services uses http with its methods and apply certain principals on it to accomplish REST app/services.
REST stand for Representational State Transfer.
Rest service is useful when you required to access service in client script like Javascript, REST services can return data in Json format that can be used in scripting languages.
Principals used to implement RESTful services
Methods used to accomplish RESTful services
REST stand for Representational State Transfer.
Rest service is useful when you required to access service in client script like Javascript, REST services can return data in Json format that can be used in scripting languages.
Principals used to implement RESTful services
- Frame every thing like it is a resource
Ex. User, Order - Every resource should be represent with a unique url
Ex. http://gstomar.blogspot.com/users/10 - Every request/response should be done with a representation
Every call should present some view - Interfaces should be simple & uniform
- Every request/response should be stateless
Every request/response should be independent from each other
Methods used to accomplish RESTful services
S.No.
|
Method
|
Description
|
1
|
GET
|
Request a specific representation of a resource
|
2
|
PUT
|
Create or Update a resource with supplied representation
|
3
|
POST
|
Submits data to be processed by a resource
|
4
|
DELETE
|
Delete a resource
|
5
|
HEAD
|
Same like GET but accesses only header information
|
6
|
OPTIONS
|
Requests list of supported methods by resource
|
No comments:
Post a Comment