- 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
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
RESTful Mock Test
This section presents you various set of Mock Tests related to RESTful Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
RESTful Mock Test I
Q 1 - What REST stands for?
Answer : B
Explanation
REST stands for REpresentational State Transfer.
Q 2 - Which of the following is true about REST?
A - REST is web standards based architecture and uses HTTP Protocol for data communication.
Answer : D
Explanation
All of the above options are correct.
Q 3 - 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 4 - Which of the following is not a valid HTTP methods used in RESTful web services?
Answer : C
Explanation
TIME is not a HTTP Verb and is not a valid HTTP methods used in RESTful web services.
Q 5 - Which of the following is not a valid HTTP methods used in RESTful web services?
Answer : C
Explanation
DATE is not a HTTP Verb and is not a valid HTTP methods used in RESTful web services.
Q 6 - Which of the following is correct about web services?
Answer : C
Explanation
A web service is a collection of open protocols and standards used for exchanging data between applications or systems. Software applications written in various programming languages and running on various platforms can use web services to exchange data over computer networks like the Internet in a manner similar to inter-process communication on a single computer.
Q 7 - Which of the following is correct about RESTful web services?
A - Web services based on REST Architecture are known as RESTful web services.
B - These web services use HTTP methods to implement the concept of REST architecture.
Answer : D
Explanation
Web services based on REST Architecture are known as RESTful web services. These web services use HTTP methods to implement the concept of REST architecture. A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides resource representation such as JSON and set of HTTP Methods.
Q 8 - 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 9 - Which of the following depicts best practice, Understandability for resource representation in REST?
Answer : A
Explanation
Understandability: Both Server and Client should be able to understand and utilize the representation format of the resource.
Q 10 - Which of the following depicts best practice, Completeness for resource representation in REST?
Answer : B
Explanation
Completeness: Format should be able to represent a resource completely. For example, a resource can contain another resource. Format should be able to represent simple as well as complex structures of resources.
Q 11 - Which of the following depicts best practice, Linkablity for resource representation in REST?
Answer : C
Explanation
Linkablity: A resource can have a linkage to another resource, a format should be able to handles such situations.
Q 12 - Which of the following protocol is used by RESTful web services as a medium of communication between client and server?
Answer : A
Explanation
RESTful web services make use of HTTP protocol as a medium of communication between client and server.
Q 13 - Which of the following is correct about messaging in RESTful web services?
B - These messages contain message data and metadata i.e. information about message itself.
Answer : C
Explanation
A client sends a message in form of a HTTP Request and server responds in form of a HTTP Response. This technique is termed as Messaging. These messages contain message data and metadata i.e. information about message itself.
Q 14 - Which of the following component of HTTP request indicates HTTP methods such as GET, POST, DELETE, PUT etc.?
Answer : A
Explanation
Verb − Indicates HTTP methods such as GET, POST, DELETE, PUT etc.
Q 15 - Which of the following component of HTTP request is used to identify the resource on server?
Answer : B
Explanation
URI − Uniform Resource Identifier (URI) to identify the resource on server.
Q 16 - Which of the following component of HTTP request is used to indicate HTTP version?
Answer : C
Explanation
HTTP Version − Indicate HTTP version, for example HTTP v1.1 .
Q 17 - 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 18 - Which of the following component of HTTP request contains message content or Resource representation?
Answer : A
Explanation
Request Body − Message content or Resource representation.
Q 19 - 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 20 - Which of the following component of HTTP response indicates HTTP version?
Answer : B
Explanation
HTTP Version − Indicate HTTP version, for example HTTP v1.1 .
Q 21 - 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 22 - Which of the following component of HTTP response contains response message content or Resource representation?
Answer : D
Explanation
Response Body − Response message content or Resource representation.
Q 23 - Which of the following is correct about addressing in RESTful web services?
A - Addressing refers to locating a resource or multiple resources lying on the server.
Answer : C
Explanation
Addressing refers to locating a resource or multiple resources lying on the server. It is analogous to locate a postal address of a person.
Answer : C
Explanation
URI stands for Uniform Resource Identifier. Each resource in REST architecture is identified by its URI.
Q 25 - Which of the following is correct about URI in RESTful web services?
A - Each resource in REST architecture is identified by its URI.
B - Purpose of an URI is to locate a resource(s) on the server hosting the web service.
Answer : C
Explanation
Each resource in REST architecture is identified by its URI. Purpose of an URI is to locate a resource(s) on the server hosting the web service.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | B |
2 | D |
3 | D |
4 | C |
5 | C |
6 | C |
7 | D |
8 | C |
9 | A |
10 | B |
11 | C |
12 | A |
13 | C |
14 | A |
15 | B |
16 | C |
17 | D |
18 | A |
19 | A |
20 | B |
21 | C |
22 | D |
23 | C |
24 | C |
25 | C |