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

REST uses various representations to represent a resource where text, JSON, XML. XML and JSON are the most popular representations of resources.

Q 2 - Which of the following component of HTTP response indicates HTTP version?

A - Status/Response Code

B - HTTP Version

C - Response Header

D - Response Body

Answer : B

Explanation

HTTP Version − Indicate HTTP version, for example HTTP v1.1 .

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 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 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 7 - Which of the following HTTP Status code means CONFLICT, states conflict situation while executing the method for example, adding duplicate entry?

A - 400

B - 401

C - 404

D - 409

Answer : D

Explanation

HTTP Status Code 409 means CONFLICT, states conflict situation while executing the method for example, adding duplicate entry.

Q 8 - Which of the following annotation of JAX RS API binds the parameter passed to method to a HTTP matrix parameter in path?

A - @PathParam

B - @QueryParam

C - @MatrixParam

D - @HeaderParam

Answer : C

Explanation

@MatrixParam − Binds the parameter passed to method to a HTTP matrix parameter in path.

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 - Purpose of an URI is to do the DNS lookup.

A - true

B - false

Answer : B

Explanation

Purpose of an URI is to locate a resource(s) on the server hosting the web service.

restful_questions_answers.htm
Advertisements