What is the RESTful design style?

RESTful is actually just a style. Its essence lies in the one-to-one correspondence between your HTTP address and your resources. That is, it can return the value you want based on your http address. Then, naturally there will be certain specifications for your URL, and each URL corresponds to an API. In this API, your request will be received, parsed, find the data you are looking for, and return the data to you, usually in json format.

So, how to achieve it? There are no strict rules. The back-end personnel can set the URL arbitrarily, and then call the URL that he has set to the front-end personnel. Of course, there is no problem.

But if it is a RESTful style, it will not be so unruly and willful. He will stick to the URL. It looks a little rigid. However, the benefits this brings to the front end are also obvious. Because it can be predicted and can be located.

RESTful API interface design standards and specifications: https://blog.csdn.net/qq_41606973/article/details/86352787

Example: https://blog.csdn.net/qq_36377960/article/details/89322337

 

Guess you like

Origin blog.csdn.net/nmj2008/article/details/114004637