The simplicity of the web makes it widely available and becomes the standard of the Internet. It is composed of three basic standards of url/http/html. HTTP is the core of the web, it is a simple request-—— reply to the transport protocol, what the client requests, what the server gives, and each message exchange is independent. HTTP is a documented protocol (documented Protocol) in which the client sends the request document to the server in an HTTP request envelope (Envelope), and the server returns the response document to the client in an HTTP response envelope.
The HTTP method (HTTP Menthod or HTTP Verb) is a very important concept for rest. If the target of the request is treated as a network resource, the HTTP method reflects the type of operation being made on the resource. Several of the HTTP methods that we use, such as get/head,put,post and delete, respectively, represent the acquisition, addition, modification, and deletion of the target resource.
Rest is technology-agnostic and represents a software architecture style. Rest is the abbreviation for representational state transfer. The Chinese translation is "representational state transfer". Prior to this, Web services had two main architectural styles, soap and XML_RPC.
Rest looks at the entire network from a resource perspective, which identifies the resources distributed on a node in the network through URLs, and the client application uses URLs to obtain the amount of resources represented by these representations, resulting in the transformation of these referencing programs into state. With the constant acquisition of resource representations, client applications are constantly changing state.
All data, whether acquired through a network request or manipulated (created, modified, and deleted), is a resource. This includes only pictures, MP3, and videos. These physical resources, which are hosted by specific files, also include data saved through a relational database and even some real-time computed data. To treat all data as a resource is the most essential attribute of rest that distinguishes it from other architectural divisions.
The ASP. NET Web API directly draws on the design of ASP. NET MVC, so there are very similar programming patterns.
Web Rest and