RESTful services Flashcards
What does REST stand for?
REpresentational State Transfer
HTTP is considered stateless because…?
The request before or after this current request are executed independently and have no knowledge of each other.
A GET command in a GET request is immediately followed by the…
resource location
The ? character in a GET request indicates…
the beginning of the parameters
Parameters in a GET request are seperated by…
The & character
What is the code for an ‘ok’ response for a HTTP request?
200 OK
What is REST?
REST is a software architecture that can be followed while designing systems.
With REST, you should provide every resource with what?
A unique ID (for example a URI).
Within REST architecture, you should link what together?
Resources, establishing relationships between the resources
What kind of methods should be used when implementing REST?
Standard methods - such as HTTP / XML
Resources can have multiple representations - what does this indicate?
Different application states
The communication in REST should use HTTP, what does this imply?
That it should be stateless
What approach is used to separate user interface from data storage?
Client / Server
The client / server interaction is…
Stateless
Servers host what?
Resources
Clients consume what?
Resources
Any information that can be named, can be a…
Resource
A resource has what associated with it?
A URI (identifier)
Any given resource can also have associated what?
Metadata
Such as media-type, last modified time etc
When accessing a resource, the resource identifier along with what is specified?
The action to be performed on the resource
Actions are defined using HTTP what?
Verbs
What does the GET verb do?
Retrieves a resource identified by a URI
What does the POST verb do?
Sends a resource to the server, updates the resource in the location identified by the URI
(Post can be used to update the resource)
What does the PUT verb do?
Sends a resource to the server, to be stored in the location identified by the URI - if the resource already exists, it is modified
(Creates the resource, starts the lifecycle)