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.

Questions and Answers

Answer : B

Explanation

REST stands for REpresentational State Transfer.

Q 2 - Which of the following component of HTTP request is used to indicate HTTP version?

A - VERB

B - URI

C - HTTP Version

D - Request Header

Answer : C

Explanation

HTTP Version − Indicate HTTP version, for example HTTP v1.1 .

Q 3 - Which of the following component of HTTP response contains metadata for the HTTP Response message as key-value pairs?

A - Status/Response Code

B - HTTP Version

C - Response Header

D - Response Body

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 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 5 - 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.

Q 6 - Which of the following HTTP Status code means NOT MODIFIED, used to reduce network bandwidth usage in case of conditional GET requests?

A - 200

B - 201

C - 204

D - 304

Answer : D

Explanation

HTTP Status Code 304 means NOT MODIFIED, used to reduce network bandwidth usage in case of conditional GET requests.

Q 7 - Which of the following HTTP Status code means CONFLICT, states conflict situation while executing the method for example, adding duplicate entry?

A - 400

B - 401

C - 404

D - 409

Answer : D

Explanation

HTTP Status Code 409 means CONFLICT, states conflict situation while executing the method for example, adding duplicate entry.

Q 8 - Which of the following annotation of JAX RS API states the HTTP Response generated by web service?

A - @DELETE

B - @HEAD

C - @Produces

D - @Consumes

Answer : C

Explanation

@Produces − States the HTTP Response generated by web service, for example APPLICATION/XML, TEXT/HTML, APPLICATION/JSON etc.

Q 9 - REST is web standards based architecture and uses HTTP Protocol for data communication.

A - false

B - true

Answer : B

Explanation

REST is web standards based architecture and uses HTTP Protocol for data communication.

Q 10 - Purpose of an URI is to do the DNS lookup.

A - true

B - false

Answer : B

Explanation

Purpose of an URI is to locate a resource(s) on the server hosting the web service.

restful_questions_answers.htm
Advertisements