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 : 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 2 - Which of the following component of HTTP request contains message content or Resource representation?

A - Request Body

B - URI

C - HTTP Version

D - Request Header

Answer : A

Explanation

Request Body − Message content or Resource representation.

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 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 - 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 6 - Which of the following HTTP Status code means NOT FOUND, states that method is not available?

A - 400

B - 401

C - 404

D - 409

Answer : C

Explanation

HTTP Status Code 404 means NOT FOUND, states that method is not available.

Q 8 - Which of the following annotation of JAX RS API binds the parameter passed to method to a Cookie?

A - @CookieParam

B - @FormParam

C - @DefaultValue

D - @Context

Answer : A

Explanation

@CookieParam − Binds the parameter passed to method to a Cookie.

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 - Each resource in REST architecture is identified by its URI.

A - true

B - false

Answer : A

Explanation

Each resource in REST architecture is identified by its URI.

restful_questions_answers.htm
Advertisements