☰ See All Chapters |
REST Tutorial
In this tutorial you will learn REST Web services development with JAX-RS API.
JAX-RS stands for java API for XML RESTful web services. (REST stands for [Representational state transfer])
REST is an architectural style which is based on web-standards and HTTP protocol.
In REST based architecture everything is Resource. Whatever the data/response we get from the server is known as Resource, Each resource can be accessed by its URI’s. We can get the resource from RESTful service in different formats like, HTML,XML,JSON,TEXT,PDF and in the Image formats as well, but in real time we mainly we will prefer JSON.
The rest client can ask for specific representation via the HTTP protocol (Content Negotiation).
REST guidelines always talk about stateless communication between client and the Server. Stateless means, every single request from client to server will be considered as a fresh request. Because of this reason REST always prefers to choose HTTP as it a stateless protocol.
JAX-RS different implementations
API | Implementation |
JAX-RS |
|
HTTP methods of REST
RESTful uses below four main HTTP methods:
GET - Retrieve Data
POST- Create/Insert Data
PUT- Update Data
DELETE- Delete Data
All Chapters