RESTful Online Quiz


Advertisements

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

Q 1 - Which of the following is not a valid HTTP methods used in RESTful web services?

A - OPTIONS

B - DELETE

C - DATE

D - POST

Answer : C

Explanation

DATE is not a HTTP Verb and is not a valid HTTP methods used in RESTful web services.

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.

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.

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 OK, shows success?

A - 200

B - 201

C - 204

D - 304

Answer : A

Explanation

HTTP Status Code 200 means OK, shows success.

Q 7 - Which of the following HTTP Status code means INTERNAL SERVER ERROR, states that server has thrown some exception while executing the method?

A - 500

B - 401

C - 404

D - 409

Answer : A

Explanation

HTTP Status Code 500 means INTERNAL SERVER ERROR, states that server has thrown some exception while executing the method.

Q 8 - Which of the following annotation of JAX RS API binds the parameter passed to method to a HTTP matrix parameter in path?

A - @PathParam

B - @QueryParam

C - @MatrixParam

D - @HeaderParam

Answer : C

Explanation

@MatrixParam − Binds the parameter passed to method to a HTTP matrix parameter in path.

Q 9 - In REST architecture, a REST Server simply provides access to resources and REST client accesses and presents the resources.

A - false

B - true

Answer : B

Explanation

In REST architecture, a REST Server simply provides access to resources and REST client accesses and presents the resources.

Q 10 - Status/Response Code - Indicate Server status for the requested resource.

A - false

B - true

Answer : B

Explanation

Status/Response Code − Indicate Server status for the requested resource.

restful_questions_answers.htm
Advertisements