What is a resource in the context of REST?
A) Any identifiable entity that can be manipulated using HTTP methods
B) A static file on the server
C) A database table
D) An HTML page
Answer:
A) Any identifiable entity that can be manipulated using HTTP methods
Explanation:
In the context of REST, a resource is any identifiable entity that can be manipulated using HTTP methods (GET, POST, PUT, DELETE, etc.). A resource is typically represented by a URI (Uniform Resource Identifier) and can be anything from a database entry, a file, or a collection of data.
Resources in REST APIs are the key entities that clients interact with. Each resource can be accessed, created, updated, or deleted using the corresponding HTTP methods, making REST a resource-centric architectural style.