- RESTful Tutorial
- 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 correct about resource representation in REST?
A - REST uses various representations to represent a resource where text, JSON, XML.
B - XML and JSON are the most popular representations of resources.
Answer : C
Explanation
REST uses various representations to represent a resource where text, JSON, XML. XML and JSON are the most popular representations of resources.
Q 2 - Which of the following component of HTTP response indicates server status for the requested resource?
Answer : A
Explanation
Status/Response Code − Indicate Server status for the requested resource. For example 404 means resource not found and 200 means response is ok.
Q 3 - Which of the following component of HTTP response contains metadata for the HTTP Response message as key-value pairs?
Answer : C
Explanation
Response Header − Contains metadata for the HTTP Response message as key-value pairs. For example, content length, content type, response date, server type etc.
Q 4 - Which of the following HTTP method should be used to delete resource using RESTful web service?
Answer : B
Explanation
DELETE opearations should be used to delete resource using RESTful web service.
Q 5 - Which of the following directive of Cache Control Header of HTTP response can set the time limit of caching?
Answer : D
Explanation
max-age directive indicates that the caching is valid up to max-age in seconds. After this, client has to make another request.
Q 6 - Which of the following is a best practice for designing a secure RESTful web service?
A - Validate Malformed XML/JSON - Check for well formed input passed to a web service method.
Answer : C
Explanation
Both of the above options are correct.
Q 7 - Which of the following annotation of JAX RS API is used to annotate a method used to create resource?
Answer : C
Explanation
@PUT − HTTP Get request, used to create resource.
Q 8 - Which of the following annotation of JAX RS API binds the parameter passed to method to a HTTP matrix parameter in path?
Answer : C
Explanation
@MatrixParam − Binds the parameter passed to method to a HTTP matrix parameter in path.
Q 9 - RESTful web services use HTTP methods to implement the concept of REST architecture.
Answer : A
Explanation
RESTful web services use HTTP methods to implement the concept of REST architecture.
Answer : B
Explanation
Purpose of an URI is to locate a resource(s) on the server hosting the web service.
To Continue Learning Please Login
Login with Google