2 ms·
REST isn't exactly aligned with CRUD, though it's often used for CRUD APIs. REST generally describes (roughly in order of most common in implementation to leas
by eyelidlessness 9y ago
REST isn't exactly aligned with CRUD, though it's often used for CRUD APIs.
REST generally describes (roughly in order of most common in implementation to least):
- HTTP requests operate on resources
- HTTP verbs describe the specific operations to perform (most typically HEAD, GET, POST, PUT, DELETE; some systems also implement OPTIONS, PATCH, custom verbs; some less-RESTful systems use POST for everything besides GET)
- Resources have a single identifier (URL); some systems get this wrong
- Query string parameters provide filtering and conditional behavior on requests for resources
- HTTP status codes indicate the condition of the response
- HTTP headers provide mechanisms for authorization/authentication, content type negotiation, pagination, error condition mitigation (redirects, rate limiting, etc)
- Responses provide URLs to related resources where appropriate
I'm probably forgetting a ton. The fundamental idea behind REST is to use the semantics of HTTP, as they were designed, to implement and interact with an API.
- Sohcahtoa82 9y agoWell damn I just got told what's up.
- eyelidlessness 9y agoI wish I'd noticed how bad the formatting was on that. I don't see a way I can edit it to fix it now.