Daily Reading 7
REST
How I explained REST to my brother
Who is Roy Fielding?
Roy Fielding is a co-creator of some of the first web servers in the world, including being credited for making the HTTP protocol.
Why don’t the techniques that we use in this class work well when we need to be able to talk to all of the machines in the world?
“Machines don’t have a universal noun,” in that each programming language is different and expects you to format requests or actions in ways that match their language.
What is the HTTP protocol that Fielding and his friends created?
Representational State Transfer. REST.
What does a GET do?
GET will request the resources that a webpage has, and is noun agnostic. GET can GET an image or a video or a block of text.
What does a POST do?
Adds a new item into another system. New entry.
What does PUT do?
Adds a new item into another system, in the place of an existing one. Replace entry.
What does PATCH do?
Append another bit of data to an existing item. expand on an existing entry.