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

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.

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.

Q 3 - Which of the following component of HTTP response contains response message content or Resource representation?

A - Status/Response Code

B - HTTP Version

C - Response Header

D - Response Body

Answer : D

Explanation

Response Body − Response message content or Resource representation.

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 only client and server?

A - Public

B - Private

C - no-cache/no-store

D - max-age

Answer : B

Explanation

Private directive indicates that resource is cachable by only client and server, no intermediary can cache the resource.

Q 6 - Which of the following HTTP Status code means FORBIDDEN, states that user is not having access to method being used for example, delete access without admin rights?

A - 400

B - 401

C - 404

D - 409

Answer : B

Explanation

HTTP Status Code 401 means FORBIDDEN, states that user is not having access to method being used for example, delete access without admin rights.

Q 7 - Which of the following annotation of JAX RS API is used to annotate a method used to create/update resource?

A - @Path

B - @GET

C - @PUT

D - @POST

Answer : D

Explanation

@POST − HTTP Get request, used to create/update resource.

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 - Which of the following annotation of JAX RS API is used to inject a context of the resource for example HTTPRequest as a context

A - @CookieParam

B - @FormParam

C - @DefaultValue

D - @Context

Answer : D

Explanation

@Context − Context of the resource for example HTTPRequest as a context.

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
E-Books Store