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 web service is a collection of open protocols and standards used for exchanging data between applications or systems. Software applications written in various programming languages and running on various platforms can use web services to exchange data over computer networks like the Internet in a manner similar to inter-process communication on a single computer.

Q 2 - Which of the following component of HTTP request indicates HTTP methods such as GET, POST, DELETE, PUT etc.?

A - VERB

B - URI

C - HTTP Version

D - Request Header

Answer : A

Explanation

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

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 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 indicates that resource is not cachable?

A - Public

B - Private

C - no-cache/no-store

D - max-age

Answer : C

Explanation

no-cache/no-store directive indicates that resource is not cachable.

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 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 - Request Header - Contains metadata for the HTTP Request message as key-value pairs.

A - false

B - true

Answer : B

Explanation

Request Header − Contains metadata for the HTTP Request message as key-value pairs.

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