Technical exchange encountered such a problem, was asked to use the development of the RESTful API, I said, we now use is not a complete restful API. Because I understand the RESTful API, it is through the specific URI locator, find the corresponding resources, and then return the data in a fixed format, this is the RESTful API. In my vague expression, however, the other person has heard that the API I'm developing now still belongs to the RESTful API. So what is the real RESTful API, today I want to make a good summary. (Before learning things always, used to go to search, and then rarely summed up, similar to this does not affect my development of the concept of things, but after the general search, there is understanding, superficial understanding.) It now seems necessary to make it clearer, because in the discussion, it is easy to deviate, the description is not clear, for learning other knowledge is unfavorable. )
Here, I see how to use retrofit to request a RESTful API, which makes me understand what is not the RESTful API and the result is incorrect. But it doesn't matter, this is not the point of this blog post. what is rest.
It can be summed up in one sentence: Rest is the architectural design guideline that all Web applications should follow.
Representational state Transfer, translation is "The Expression Layer status transformation".
Resource-oriented is the most obvious feature of rest, a different set of operations for the same resource. A resource is a named abstract concept on a server, and resources are organized with nouns as their core, and the first concern is nouns. Rest requires that you perform various operations on resources through a unified interface. Only a limited set of operations can be performed for each resource. (7 HTTP methods: get/post/put/delete/patch/head/options) What is the restful API.
An API that conforms to the rest architecture design. Summary
An API that conforms to the rest design standard, that is, the RESTful API. The rest architecture design, followed by the standards and guidelines, is the performance of the HTTP protocol, in other words, the HTTP protocol is a rest architecture design pattern. For example, no State, request-response ...
Reference:
Understand your own REST architecture style
http://www.infoq.com/cn/articles/understanding-restful-style/
Understanding RESTful architecture
Http://www.ruanyifeng.com/blog/2011/09/restful.html
Restful API Design Guide
Http://www.ruanyifeng.com/blog/2014/05/restful_api.html