Which sentence best describes REST?
Options
- A database engine that is designed for storing web data
- A style for web APIs: resources with URLs, acted on by HTTP methods (Correct option)
- A security protocol that is used for logins and sessions
- A JavaScript framework that is used for building frontends
Answer
A style for designing web APIs: things are resources with URLs, and the standard HTTP methods (GET, POST, PUT, DELETE) act on them
Why
REST (Representational State Transfer) is an architectural style described by Roy Fielding in his doctoral dissertation (2000). It is not a library or a protocol.
In practice: GET /users/42 reads user 42, POST /users creates one, DELETE /users/42 removes it.
Its constraints include client-server, stateless requests, cacheable responses and a uniform interface.
Remember
REST = resources + URLs + HTTP methods.