3 ms·
> What is REST? I use it every day but would have to look up a proper definition for you. REpresentation State Transfer ... That's about all I can do to defi
by Sohcahtoa82 9y ago
> What is REST? I use it every day but would have to look up a proper definition for you.
REpresentation State Transfer
...
That's about all I can do to define REST. I can't really tell you what it really means beyond describing CRUD, but I can identify a REST interface when I see one.
- eyelidlessness 9y agoREST 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.