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

REST stands for REpresentational State Transfer.

Q 2 - Which of the following component of HTTP request indicates HTTP methods such as GET, POST, DELETE, PUT etc.?

A - VERB

B - URI

C - HTTP Version

D - Request Header

Answer : A

Explanation

Verb − Indicates HTTP methods such as GET, POST, DELETE, PUT etc.

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 indicates that resource is cachable by any component?

A - Public

B - Private

C - no-cache/no-store

D - max-age

Answer : A

Explanation

Public directive indicates that resource is cachable by any component.

Q 7 - Which of the following annotation of JAX RS API is used to annotate a method used to create/update resource?

A - @Path

B - @GET

C - @PUT

D - @POST

Answer : D

Explanation

@POST − HTTP Get request, used to create/update resource.

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 - A RESTful web service client sends a message in form of a Gopher Request and server responds in form of a HTTP Response.

A - true

B - false

Answer : B

Explanation

A RESTful web service client sends a message in form of a HTTP Request and server responds in form of a HTTP Response.

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