Web services are very common these days as everything or most of the implementation is now API based. Every social network is providing API for fetching their data. Like if you take a case of TWITTER, it provides it's API to fetch different data related to user or for analytic. There are 2 types of web services namely:
POST
It is used for creating a new entity. It is basically used with form i.e. whenever we want to submit data.
Ex: POST /items
PUT
It is doing same thing as POST but it usually used for updating entity.
Ex: PUT /items/itemid
GET
This is the method that is used mostly in REST. It will fetch data from back end. The data can be returned in any of the forms like XML, JSON, PDF etc.
Ex: GET /items (fetching multiple items)
GET /items/itemid (fetching a single item)
DELETE
Yes, as already guessed from the name it is used to delete the record.
Ex: DELETE /items/itemid
Helpful Resources:
Jersey is the reference implementation of the JAX RS 2.0 (JSR 339).
POSTMAN It is very good light weight client for testing RESTful web services for Google Chrome and can be downloaded from here
Hope you enjoyed it.
- SOAP
- REST
- POST
- PUT
- GET
- DELETE
POST
It is used for creating a new entity. It is basically used with form i.e. whenever we want to submit data.
Ex: POST /items
PUT
It is doing same thing as POST but it usually used for updating entity.
Ex: PUT /items/itemid
GET
This is the method that is used mostly in REST. It will fetch data from back end. The data can be returned in any of the forms like XML, JSON, PDF etc.
Ex: GET /items (fetching multiple items)
GET /items/itemid (fetching a single item)
DELETE
Yes, as already guessed from the name it is used to delete the record.
Ex: DELETE /items/itemid
Helpful Resources:
Jersey is the reference implementation of the JAX RS 2.0 (JSR 339).
POSTMAN It is very good light weight client for testing RESTful web services for Google Chrome and can be downloaded from here
Hope you enjoyed it.
Comments
Post a Comment