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

REST stands for REpresentational State Transfer.

Q 2 - Which of the following component of HTTP response indicates server status for the requested resource?

A - Status/Response Code

B - HTTP Version

C - Response Header

D - Response Body

Answer : A

Explanation

Status/Response Code − Indicate Server status for the requested resource. For example 404 means resource not found and 200 means response is ok.

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 used to create/update resource using RESTful web service?

A - GET

B - DELETE

C - POST

D - OPTIONS

Answer : C

Explanation

POST opearations should be used to create/update resource using RESTful web service.

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 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 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 HTTP header?

A - @PathParam

B - @QueryParam

C - @MatrixParam

D - @HeaderParam

Answer : D

Explanation

@HeaderParam − Binds the parameter passed to method to a HTTP header.

Q 9 - RESTful web services make use of FTP protocol as a medium of communication between client and server.

A - true

B - false

Answer : B

Explanation

RESTful web services make use of HTTP protocol as a medium of communication between client and server.

Q 10 - GET opearations should be readonly.

A - true

B - false

Answer : A

Explanation

GET opearations should be readonly.

restful_questions_answers.htm
Advertisements