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

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 header of HTTP response, provides the date and time of the resource when it was created?

A - Date

B - Last Modified

C - Cache-Control

D - Expires

Answer : A

Explanation

Date header provides the date and time of the resource when it was created.

Q 5 - Which of the following header of HTTP response provides control over caching?

A - Date

B - Last Modified

C - Cache-Control

D - Expires

Answer : C

Explanation

Cache-Control is the primary header to control caching.

Q 6 - Which of the following HTTP Status code means FORBIDDEN, states that user is not having access to method being used for example, delete access without admin rights?

A - 400

B - 403

C - 404

D - 409

Answer : B

Explaination

HTTP Status Code 403 means FORBIDDEN, states that user is not having access to method being used for example, delete access without admin rights.

Q 8 - Which of the following annotation of JAX RS API states the HTTP Request type?

A - @DELETE

B - @HEAD

C - @Produces

D - @Consumes

Answer : D

Explanation

@Consumes − States the HTTP Request type, for example application/x-www-form-urlencoded to accept form data in HTTP body during POST request.

Q 9 - A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides resource representation such as JSON and set of HTTP Methods.

A - false

B - true

Answer : B

Explanation

A RESTful web service usually defines a URI, Uniform Resource Identifier a service, provides resource representation such as JSON and set of HTTP Methods.

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