Using RESTful APIs
Talks about Rest:Why
- A way to architect data and the traffic that acts on that data
- Communicates what resource you are trying to access and what you want to do with that resource, through a URL
- Components of a request: type (POST, GET, DELETE, PATCH, etc. and resource, the actual url)
- GET /users (request only, should not have side effects)
- POST /users/1, data:
{ first_name: “Donald” }
listento
preferred to on
: it’s about memory management. When you destroy views listento
event listeners will be cleaned up automatically.