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

Explanation

A client sends a message in form of a HTTP Request and server responds in form of a HTTP Response. This technique is termed as Messaging. These messages contain message data and metadata i.e. information about message itself.

Q 3 - Which of the following component of HTTP response contains metadata for the HTTP Response message as key-value pairs?

A - Status/Response Code

B - HTTP Version

C - Response Header

D - Response Body

Answer : C

Explanation

Response Header − Contains metadata for the HTTP Response message as key-value pairs. For example, content length, content type, response date, server type etc.

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 directive of Cache Control Header of HTTP response can set the time limit of caching?

A - Public

B - Private

C - no-cache/no-store

D - max-age

Answer : D

Explanation

max-age directive indicates that the caching is valid up to max-age in seconds. After this, client has to make another request.

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

A - @Path

B - @GET

C - @PUT

D - @POST

Answer : C

Explanation

@PUT − HTTP Get request, used to create resource.

Q 8 - Which of the following annotation of JAX RS API states the HTTP Response generated by web service?

A - @DELETE

B - @HEAD

C - @Produces

D - @Consumes

Answer : C

Explanation

@Produces − States the HTTP Response generated by web service, for example APPLICATION/XML, TEXT/HTML, APPLICATION/JSON etc.

Q 9 - URI of HTTP request indicates HTTP methods to be executed by RESTful Web services.

A - false

B - true

Answer : A

Explanation

HTTP Verb − Indicates HTTP methods such as GET, POST, DELETE, PUT etc.

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