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 : B

Explanation

Completeness: Format should be able to represent a resource completely. For example, a resource can contain another resource. Format should be able to represent simple as well as complex structures of resources.

Q 2 - Which of the following component of HTTP request contains metadata for the HTTP Request message as key-value pairs?

A - VERB

B - URI

C - HTTP Version

D - Request Header

Answer : D

Explanation

Request Header − Contains metadata for the HTTP Request message as key-value pairs. For example, client ( or browser) type, format supported by client, format of message body, cache settings etc.

Answer : C

Explanation

URI stands for Uniform Resource Identifier. Each resource in REST architecture is identified by its URI.

Q 4 - Which of the following HTTP method should be used to get status of method availability in RESTful web service?

A - GET

B - HEAD

C - PUT

D - OPTIONS

Answer : B

Explanation

HEAD opearations should be used to get status of method availability in RESTful web service.

Q 5 - Which of the following directive of Cache Control Header of HTTP response can set the time limit of caching?

A - Public

B - Private

C - no-cache/no-store

D - max-age

Answer : D

Explanation

max-age directive indicates that the caching is valid up to max-age in seconds. After this, client has to make another request.

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 Cookie?

A - @CookieParam

B - @FormParam

C - @DefaultValue

D - @Context

Answer : A

Explanation

@CookieParam − Binds the parameter passed to method to a Cookie.

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 - POST opearations should be idempotent.

A - true

B - false

Answer : B

Explanation

POST operation can cause different result.


restful_questions_answers.htm

Advertisements