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

Completeness: Format should be able to represent a resource completely. For example, a resource can contain another resource. Format should be able to represent simple as well as complex structures of resources.

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

Addressing refers to locating a resource or multiple resources lying on the server. It is analogous to locate a postal address of a person.

Q 4 - 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 5 - 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 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 - A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides resource representation such as JSON and set of HTTP Methods.

A - false

B - true

Answer : B

Explanation

A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides resource representation such as JSON and set of HTTP Methods.

Q 10 - Web services can treat each method request independently.

A - true

B - false

Answer : A

Explanation

Web services can treat each method request independently.

restful_questions_answers.htm
Advertisements