RESTful Online Quiz



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 request is used to identify the resource on server?

A - VERB

B - URI

C - HTTP Version

D - Request Header

Answer : B

Explanation

URI − Uniform Resource Identifier (URI) to identify the resource on server.

Q 3 - Which of the following is a best practice to create a standard URI for a web service?

A - Maintain Backward Compatibility

B - Use HTTP Verb

C - Both of the above.

D - None of the above.

Answer : C

Explanation

Both of the above options are correct.

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 8 - Which of the following annotation of JAX RS API binds the parameter passed to method to a HTTP header?

A - @PathParam

B - @QueryParam

C - @MatrixParam

D - @HeaderParam

Answer : D

Explanation

@HeaderParam − Binds the parameter passed to method to a HTTP header.

Q 9 - In REST architecture, a REST Server simply provides access to resources and REST client accesses and presents the resources.

A - false

B - true

Answer : B

Explanation

In REST architecture, a REST Server simply provides access to resources and REST client accesses and presents the resources.

Q 10 - Web services can treat each method request independently.

A - true

B - false

Answer : A

Explanation

Web services can treat each method request independently.

restful_questions_answers.htm
Advertisements