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

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

A - GET

B - PUT

C - TIME

D - POST

Answer : C

Explanation

TIME 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

URI stands for Uniform Resource Identifier. Each resource in REST architecture is identified by its URI.

Q 4 - 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 5 - 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 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 form value?

A - @CookieParam

B - @FormParam

C - @DefaultValue

D - @Context

Answer : B

Explanation

@FormParam − Binds the parameter passed to method to a form value.

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 - GET opearations should be readonly.

A - true

B - false

Answer : A

Explanation

GET opearations should be readonly.

restful_questions_answers.htm
Advertisements