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

Q 3 - Which of the following is a best practice to create a standard URI for a web service?

A - Use Plural Noun.

B - Avoid using spaces.

C - Use lowercase letters

D - All of the above.

Answer : D

Explanation

All of the above options are correct.

Q 4 - Which of the following HTTP method should be used to get status of method availability in RESTful web service?

A - GET

B - HEAD

C - PUT

D - OPTIONS

Answer : B

Explanation

HEAD opearations should be used to get status of method availability 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 assigns a default value to a parameter passed to method?

A - @CookieParam

B - @FormParam

C - @DefaultValue

D - @Context

Answer : C

Explanation

@DefaultValue − Assigns a default value to a parameter passed to method.

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