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

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.

Q 4 - Which of the following HTTP method should be read only in nature?

A - GET

B - DELETE

C - POST

D - PUT

Answer : A

Explanation

GET opearations should be read only.

Q 5 - Which of the following directive of Cache Control Header of HTTP response provides indication to server to revalidate resource if max-age has passed?

A - must-revalidate

B - Private

C - no-cache/no-store

D - max-age

Answer : A

Explanation

must-revalidate directive provides indication to server to revalidate resource if max-age has passed.

Q 6 - Which of the following HTTP Status code means CREATED, when a resource is successful created using POST or PUT request?

A - 200

B - 201

C - 204

D - 304

Answer : B

Explanation

HTTP Status Code 201 means CREATED, when a resource is successful created using POST or PUT request.

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

A - @Path

B - @GET

C - @PUT

D - @POST

Answer : B

Explanation

@GET − HTTP Get request, used to fetch resource.

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 - 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 - Request Body - Contains Message content or Resource representation.

A - true

B - false

Answer : A

Explanation

Request Body − Contains Message content or Resource representation.


restful_questions_answers.htm

Advertisements