RESTful WEB API design with nodejs 10
Let’s look at the key principles around the HTTP and URI standards, sticking to which will make your HTTP application a RESTful service-enabled application:
Everything is a resource
Each resource is identifiable by aunique identifier(URI)
Resources are manipulated via standard HTTP methods
Resources can have multiple representations –(forExample data can be send by Json or XML)
Communicate with resources in a stateless manner
Posting only the updated price is not stateless, as it implies that the application is aware that the resource has a price field, that is, it knows its state.
All this complexity was caused mainly because the initial idea of the web service was to execute business logic remotely, not to transport large amounts of data.
- Separation of the representation and the resource
If you are familiar with SOAP web services, you may have heard of theWeb Service Definition Language(WSDL).
A fully fledged currency requires both a central bank and a treasury.
--Write by Marcustar，关关雎鸠，在河之洲