pro tip: start with chapter 5
GET /tacos Accept: video/mp4 {other headers here} HTTP/1.1 200 OK Cache-Control: public, max-age: 3600 Content-Type: video/mp4 Date: Fri, 21 Feb 2019 19:35:00 GMT Vary: Accept-Encoding Content-Length: 20190505 Connection: keep-alive X-Powered-By: Scala on Scales
* They may be the best way to pass auth back and forth
An architecture for the web must therefore be designed with the context of communicating large-grain data objects across high-latency networks and multiple trust boundaries.
- Roy Fielding
An interesting observation is that the most efficient network request is one that doesn't use the network.
- Roy Fielding
HTTP/1.1 304 Not Modified Cache-Control: public, max-age: 3600 ETag: a1234b1234 Content-Type: application/json Date: Fri, 21 Feb 2019 19:44:00 GMT Vary: Accept-Encoding Content-Length: 42 Connection: keep-alive X-Powered-By: Python on a Plane 2.999
If-Modified-Since If-None-Match Vary
Since REST is specifically targeted at distributed information systems, it views an application as a cohesive structure of information and control alternatives through which a user can perform a desired task.
- Roy Fielding
Accept
Content-Type
POST /tokens HTTP/1.1 201 Created Cache-Control: no-cache, no-store Content-Type: application/hal+json Date: Fri, 21 Feb 2019 19:52:00 GMT Content-Length: 337 X-Powered-By: COBOL ON COGS 1.0.0RC3
POST /tokens Accept: image/png HTTP/1.1 201 Created Cache-Control: no-cache, no-store Content-Type: image/png Date: Fri, 21 Feb 2019 19:52:25 GMT Content-Length: 1337 X-Powered-By: Python on a Plane 2.999
POST /tokens Accept: text/xml HTTP/1.1 406 Not Acceptable Cache-Control: no-cache, no-store Date: Fri, 21 Feb 2019 19:52:45 GMT Content-Length: 1337 X-Powered-By: NodeLiveScript 0.8
...but know why you're picking a tool for the job
'cuz Buzzword Driven Development is considered harmful