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 : D

Explanation

Web services based on REST Architecture are known as RESTful web services. These web services use HTTP methods to implement the concept of REST architecture. 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 3 - Which of the following HTTP method should be idempotent in nature?

A - GET

B - PUT

C - POST

D - HEAD

Answer : B

Explanation

PUT opearations should be idempotent, means their result will always same no matter how many times these operations are invoked.

Q 4 - Which of the following HTTP method should be used to create resource using RESTful web service?

A - GET

B - DELETE

C - PUT

D - OPTIONS

Answer : C

Explanation

PUT opearations should be used to create resource using RESTful web service.

Q 5 - Which of the following header of HTTP response provides control over caching?

A - Date

B - Last Modified

C - Cache-Control

D - Expires

Answer : C

Explanation

Cache-Control is the primary header to control caching.

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 7 - Which of the following annotation of JAX RS API is used to annotate a method to get the relative path of the resource class/method?

A - @Path

B - @GET

C - @PUT

D - @POST

Answer : A

Explanation

@Path - Relative path of the resource class/method.

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

A - @PathParam

B - @QueryParam

C - @MatrixParam

D - @HeaderParam

Answer : A

Explanation

@PathParam − Binds the parameter passed to method to a value in path.

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

A - true

B - false

Answer : B

Explanation

PUT opearations should be idempotent.

restful_questions_answers.htm
Advertisements