Method and device called by http interface
A technology of interface calling and interface, applied in the computer field, can solve problems such as flexibility, maintainability, poor readability, and high code coupling, and achieve the effects of strong maintainability, clear business logic, and improved efficiency
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Publication Date
- 2021-04-30
Smart Images

Figure 1 
Figure 2 
Figure 3
Abstract
Description
technical field
[0001] The invention relates to the technical field of computers, in particular to a method and a device for invoking an HTTP interface. Background technique
[0002] HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol) is a set of rules for computers to communicate through the network. When the client calls the server, the server provides an HTTP interface, and the client needs to write different hardware based on different URLs and request parameters. Code, at this time, if there are many different interfaces, you need to write a separate HTTP request code for each interface, which is very inflexible.
[0003] At present, the most common solution is to provide a public request tool class. When using third-party data in daily development, the third party may provide several ways to obtain data, such as HTTP and remote calling. Usually the HTTP method is the simplest and most favored by developers. When using the HTTP method to obtain data, you ne...
Examples
Embodiment Construction
[0036] Exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
[0037] Because the technical solution of the embodiment of the present invention adopts HTTP service-oriented interface programming, that is, the business of the remote server that the client depends on is first extracted as an interface, and the business of the remote server is specifically realized through the implementation class of the interface. When the server realize...