REST Flashcards
1
Q
what is the full form of REST
A
REpresentational State Transfer
2
Q
What are the Architectural principles used in REST?
A
- Addressable resources : Key information of information in REST is a resource, each resource must be addressable via URI
- Uniform, constrained interface
Small set of well-defined methods to manipulate ur resources - Representation Oriented: Interact with services using representation of that services
- Communication Statelessly: Statelesss application are easier to scale
3
Q
Does REST is protocol specific
A
No, REST is not protocol specific., but when people talk about REST they usually mean REST over HTTP.
4
Q
Some points about HTTP
A
- Synchronous request/response-based application network protocol
- Used for distributed, collaborative, document based systems.
5
Q
What does the request message made up of?
A
- the HTTP method being invoked. (GET/POST)
- The location of the resource
- variable set of headers
- Optional message body (that can be anything like JSON, or XML format)
6
Q
What does the response message contains?
A
- Version of HTTP
- response code
- Variable set of headers
- Optional message body
- Shot message that explains the response
7
Q
Addressability Idea
A
Idea that every object and resource in your system is reachable through a unique Identifier
8
Q
Uniform, Constrained Interface?
A
The idea is to stick to finite set of operations of the application protocol you are distributing your services upon
9
Q
JAX-RS
A
A framework focuses on applying java annotations to plain java objects