- RESTful - Home
- RESTful - Introduction
- RESTful - Environment Setup
- RESTful - First Application
- RESTful - Resources
- RESTful - Messages
- RESTful - Addressing
- RESTful - Methods
- RESTful - Statelessness
- RESTful - Caching
- RESTful - Security
- RESTful - Java (JAX-RS)
- RESTful Useful Resources
- RESTful - Questions and Answers
- RESTful - Quick Guide
- RESTful - Useful Resources
- RESTful - Discussion
RESTful Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to RESTful Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the following is true about REST?
B - Each resource is identified by URIs/ global IDs.
C - REST uses various representations to represent a resource like text, JSON and XML.
Answer : D
Explanation
All of the above options are correct.
Q 2 - Which of the following component of HTTP request contains metadata for the HTTP Request message as key-value pairs?
Answer : D
Explanation
Request Header − Contains metadata for the HTTP Request message as key-value pairs. For example, client ( or browser) type, format supported by client, format of message body, cache settings etc.
Q 3 - Which of the following is correct about statelessness in context of RESTful web service?
A - As per REST architecture, a RESTful web service should not keep a client state on server.
Answer : C
Explanation
Both of the above options are correct.
Q 4 - Which of the following HTTP method should be idempotent in nature?
Answer : B
Explanation
DELETE opearations should be idempotent, means their result will always same no matter how many times these operations are invoked.
Q 5 - Which of the following directive of Cache Control Header of HTTP response indicates that resource is cachable by only client and server?
Answer : B
Explanation
Private directive indicates that resource is cachable by only client and server, no intermediary can cache the resource.
Q 6 - Which of the following HTTP Status code means CREATED, when a resource is successful created using POST or PUT request?
Answer : B
Explanation
HTTP Status Code 201 means CREATED, when a resource is successful created using POST or PUT request.
Q 7 - Which of the following annotation of JAX RS API is used to annotate a method used to create/update resource?
Answer : D
Explanation
@POST − HTTP Get request, used to create/update resource.
Q 8 - Which of the following annotation of JAX RS API states the HTTP Response generated by web service?
Answer : C
Explanation
@Produces − States the HTTP Response generated by web service, for example APPLICATION/XML, TEXT/HTML, APPLICATION/JSON etc.
Q 9 - A RESTful web service client sends a message in form of a Gopher Request and server responds in form of a HTTP Response.
Answer : B
Explanation
A RESTful web service client sends a message in form of a HTTP Request and server responds in form of a HTTP Response.
Answer : A
Explanation
Request Body − Contains Message content or Resource representation.