Pro Coder Quiz

1. What does REST stand for?
A) Remote Elastic Server Technology
B) Representational State Transfer
C) Remote Entity State Transition
D) Runtime Environment Setup Tool
Correct Answer: Option B
2. What status code indicates that a resource has been successfully created?
A) 200 OK
B) 201 Created
C) 204 No Content
D) 400 Bad Request
Correct Answer: Option B
3. Which HTTP method is used to partially update the resource
A) PUTCorrect Answer: Option C
4. Which HTTP status code indicates a redirection?
A) 100 ContinueCorrect Answer: Option D
5. A Client want the products list, what should be the Correct URL
A) GET /getProductList
B) GET /products
C) GET /getProductList/1
D) GET /v1/products
Correct Answer: Option D
6. What category does the 5xx HTTP code belong to?
A) RedirectionCorrect Answer: Option D
7. Which among the below directives belonging to the Cache-Control header of HTTP response provide information to the server that the resources have to be revalidated if max-age has crossed?
A) no-store
B) must-revalidate
C) no-cache
D) None of the above
Correct Answer: Option B
8. What category do 1xx HTTP status codes belong to?
A) Server ErrorCorrect Answer: Option D
9. Which directive of the Cache-control header in the HTTP Response tells that the resource cannot be cached?
A) publicCorrect Answer: Option C
10. What is the most appropriate way to inform users about resource creation?
A) Body: {status: "success", data: ...}. Status Code: 201 Ok
B) Status Code: 201 Created
C) Status Code: 200 Success
D) None of the above
Correct Answer: Option B
11. Your API resource does no allow deletion, and a client application attempted to delete the resource. What HTTP response code should you return?
A) 409 Conflict
B) 400 Bad Request
C) 406 Not Acceptable
D) 405 Method Not Allowed
Correct Answer: Option D
12. What is the modern specification for describing an API?
A) WSDL
B) WADL
C) OAuth
D) OpenAPI (Swagger)
Correct Answer: Option D13. What purpose does a User-Agent serve?
A) It identifies the client application or SDK.
Correct Answer: Option A
14. It is a good practice to write-long-resources-in-such-style
A) Kebab case
B) Studly caps
C) Camel case
D) Caesar cipher
Correct Answer: Option A
15. You want to generate interactive API documentation for your RESTful APIs, making it easy for developers to explore and understand endpoints. Which tool is designed for this purpose?
A) Postman
B) Swagger
C) SoapUI
D) JMeter
Correct Answer: Option A or B