In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
1 、 Introduction. .
1.1.The introduction of REST.
1.1. The purpose of writing. ..
1.2, the principle of writing.
1.3. Change history.
2. Service usage instructions
2.1. The services already provided by the current system. .
2.2.2.The service is called in GET mode.
2.3.The service is called in POST mode. ..
2. My list of collection services.
2.1, add label classification.
2.2. Delete the classification label.
2.3. Update the classification label.
1. Introduction
1.1introduction to REST
REpresentational State Transfer (REST) is an architectural principle that treats a web service as a resource that can be uniquely identified by its URL. A key feature of RESTful Web services is the explicit use of HTTP methods to represent invocations of different operations.
The basic design principles of REST use the HTTP protocol approach for typical CRUD operations:
POST-create a resource
GET-retrieve resources
PUT-Update Resources
DELETE-Delete a resource
The main advantages of REST services are:
They are highly reusable across platforms (Java,. Net, PHP, etc.) because they all rely on the basic HTTP protocol.
They use basic XML instead of complex SOAP XML and are very convenient to use.
REST-based web services are increasingly becoming the preferred method for back-end enterprise service integration. Compared with SOAP-based web services, its programming model is simple, and the use of native XML (rather than SOAP) reduces the complexity of the serialization and deserialization process, and eliminates the need for other third-party libraries that do the same.
1.2. Purpose of writing
The purpose of writing this article is to modularize and service the system function, and provide the user's operation in the way of service. The interaction between the system and the system follows the service specification, and the interaction between the system and the system is transformed into customized service interaction, in order to realize the integration between the system and the system.
1.3. Principles of compilation
Everything in Addressability REST is based on the concept of resources. Unlike objects or other nouns in OOP, resources are abstract and must be addressable or accessible through URI. Interface consistency (Interface uniformity), unlike SOAP or other standards, REST requires that the
Methods or verbs are not arbitrary. This means that developers of RESTful services can only use methods supported by HTTP, such as GET, PUT, POST, DELETE, and so on. Therefore, there is no need to use service description languages such as WSDL. Stateless (Statelessness) to enhance scalability, the server side does not store the client's state information. This makes the server unbound to a specific client and makes load balancing much easier. It also makes the server easier to monitor and more reliable.
The Representational client always interacts with some representation of the resource, never directly with the resource itself.
There can also be multiple representations of the same resource. In theory, any client that holds a representation of the resource should have enough information to manipulate the underlying resource.
Connectedness any REST-based system should foresee that the client needs to access the relevant resources and should include these resources in the returned resource representation. For example, you can include the relevant steps in the sequence of operations of a particular RESTful service in the form of a hyperlink so that clients can access them as needed.
1.4. Change history
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.