RESTful API Understanding _ Architecture

Source: Internet
Author: User
Tags representational state transfer

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.