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 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 .

Answer : C

Explanation

Addressing refers to locating a resource or multiple resources lying on the server. It is analogous to locate a postal address of a person.

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 header of HTTP response sets expiration date and time of caching?

A - Date

B - Last Modified

C - Cache-Control

D - Expires

Answer : D

Explanation

Expires header sets expiration date and time of caching.

Q 6 - Which of the following HTTP Status code means BAD REQUEST, states that invalid input is provided e.g. validation error, missing data?

A - 400

B - 401

C - 404

D - 409

Answer : A

Explanation

HTTP Status Code 400 means BAD REQUEST, states that invalid input is provided e.g. validation error, missing data.

Q 7 - Which of the following HTTP Status code means INTERNAL SERVER ERROR, states that server has thrown some exception while executing the method?

A - 500

B - 401

C - 404

D - 409

Answer : A

Explanation

HTTP Status Code 500 means INTERNAL SERVER ERROR, states that server has thrown some exception while executing the 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