RESTful Mock Test


Advertisements

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.

Questions and Answers

RESTful Mock Test II

Q 1 - Which of the following is a best practice to create a standard URI for a web service?

A - Use Plural Noun.

B - Avoid using spaces.

C - Use lowercase letters

D - All of the above.

Answer : D

Explanation

All of the above options are correct.

Q 2 - Which of the following is a best practice to create a standard URI for a web service?

A - Maintain Backward Compatibility

B - Use HTTP Verb

C - Both of the above.

D - None of the above.

Answer : C

Explanation

Both of the above options are correct.

Q 5 - Which of the following HTTP method should be idempotent in nature?

A - GET

B - PUT

C - POST

D - HEAD

Answer : B

Explanation

PUT opearations should be idempotent, means their result will always same no matter how many times these operations are invoked.

Q 6 - Which of the following HTTP method should be idempotent in nature?

A - OPTIONS

B - DELETE

C - POST

D - HEAD

Answer : B

Explanation

DELETE opearations should be idempotent, means their result will always same no matter how many times these operations are invoked.

Q 7 - Which of the following HTTP method should be read only in nature?

A - GET

B - DELETE

C - POST

D - PUT

Answer : A

Explanation

GET opearations should be read only.

Q 8 - Which of the following HTTP method should be used to create/update resource using RESTful web service?

A - GET

B - DELETE

C - POST

D - OPTIONS

Answer : C

Explanation

POST opearations should be used to create/update resource using RESTful web service.

Q 9 - Which of the following HTTP method should be used to delete resource using RESTful web service?

A - GET

B - DELETE

C - POST

D - OPTIONS

Answer : B

Explanation

DELETE opearations should be used to delete resource using RESTful web service.

Q 10 - Which of the following HTTP method should be used to create resource using RESTful web service?

A - GET

B - DELETE

C - PUT

D - OPTIONS

Answer : C

Explanation

PUT opearations should be used to create resource using RESTful web service.

Q 11 - Which of the following HTTP method should be used to fetch resource using RESTful web service?

A - GET

B - DELETE

C - PUT

D - OPTIONS

Answer : A

Explanation

GET opearations should be used to fetch resource using RESTful web service.

Q 12 - Which of the following HTTP method should be used to get status of method availability in RESTful web service?

A - GET

B - HEAD

C - PUT

D - OPTIONS

Answer : B

Explanation

HEAD opearations should be used to get status of method availability in RESTful web service.

Q 13 - Which of the following HTTP method should be used to get list the supported operations in RESTful web service?

A - GET

B - HEAD

C - PUT

D - OPTIONS

Answer : D

Explanation

OPTIONS opearations should be used to get list the supported operations in RESTful web service.

Q 15 - Which of the following header of HTTP response, provides the date and time of the resource when it was created?

A - Date

B - Last Modified

C - Cache-Control

D - Expires

Answer : A

Explanation

Date header provides the date and time of the resource when it was created.

Q 16 - Which of the following header of HTTP response, provides the date and time of the resource when it was last modified?

A - Date

B - Last Modified

C - Cache-Control

D - Expires

Answer : B

Explanation

Last Modified header provides the date and time of the resource when it was last modified.

Q 17 - Which of the following header of HTTP response provides control over caching?

A - Date

B - Last Modified

C - Cache-Control

D - Expires

Answer : C

Explanation

Cache-Control is the primary header to control caching.

Q 18 - Which of the following header of HTTP response sets expiration date and time of caching?

A - Date

B - Last Modified

C - Cache-Control

D - Expires

Answer : D

Explanation

Expires header sets expiration date and time of caching.

Q 19 - Which of the following directive of Cache Control Header of HTTP response indicates that resource is cachable by any component?

A - Public

B - Private

C - no-cache/no-store

D - max-age

Answer : A

Explanation

Public directive indicates that resource is cachable by any component.

Q 20 - Public directive of Cache Control Header of HTTP response indicates that resource is cachable by any component.

A - true

B - false

Answer : A

Explanation

Public directive indicates that resource is cachable by any component.

Q 21 - Which of the following directive of Cache Control Header of HTTP response indicates that resource is cachable by only client and server?

A - Public

B - Private

C - no-cache/no-store

D - max-age

Answer : B

Explanation

Private directive indicates that resource is cachable by only client and server, no intermediary can cache the resource.

Q 22 - Which of the following directive of Cache Control Header of HTTP response indicates that resource is not cachable?

A - Public

B - Private

C - no-cache/no-store

D - max-age

Answer : C

Explanation

no-cache/no-store directive indicates that resource is not cachable.

Q 23 - Which of the following directive of Cache Control Header of HTTP response can set the time limit of caching?

A - Public

B - Private

C - no-cache/no-store

D - max-age

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 24 - Which of the following directive of Cache Control Header of HTTP response provides indication to server to revalidate resource if max-age has passed?

A - must-revalidate

B - Private

C - no-cache/no-store

D - max-age

Answer : A

Explanation

must-revalidate directive provides indication to server to revalidate resource if max-age has passed.

Answer : D

Explanation

All of the above options are correct.

Answer Sheet

Question Number Answer Key
1 D
2 C
3 C
4 D
5 B
6 B
7 A
8 C
9 B
10 C
11 A
12 B
13 D
14 C
15 A
16 B
17 C
18 D
19 A
20 A
21 B
22 C
23 D
24 A
25 D
restful_questions_answers.htm
Advertisements