API interface packaging and calling method and system

A technology of API interface and calling method, which is applied in the computer field, can solve the problems of manually introducing and configuring dependencies for calling, and achieve the effect of avoiding errors and saving time
CN112631694AActive Publication Date: 2021-04-09YGSOFT INC

Patent Information

Authority / Receiving Office
CN ยท China
Patent Type
Applications(China)
Current Assignee / Owner
YGSOFT INC
Publication Date
2021-04-09

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention relates to an API (Application Programming Interface) packaging and calling method and system, and solves the problems that in the prior art, API original manual packaging and calling need to be manually introduced and depends on configuration. The method comprises the steps of reading a first interface configuration file of an API interface, and automatically obtaining an interface name, an interface request type, a sample request parameter and a sample return parameter of the API interface; adding a timeout and interception mode corresponding to the interface request type in a local configuration file into the first interface configuration file to generate a second interface configuration file; adding the API directory information in the configuration file into an API directory file; scanning and matching a calling mode, an interface name and an interface request type of a to-be-called API in the API directory file, calling the API according to the sample request parameter after the scanning information is successfully matched, matching a return parameter of the API with a sample return parameter; if the matching is successful, taking a second interface configuration file as a new configuration file, and ending packaging calling.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the field of computer technology, in particular to an API interface encapsulation calling method and system. Background technique

[0002] API (Application Programming Interface, application programming interface) is some pre-defined functions, or refers to the agreement of different components of the software system. A set of routines that applications and developers can access based on a piece of software or hardware without accessing the source code or understanding the details of the inner workings.

[0003] At present, the main process of API encapsulation and calling is as follows: first store the API interface in the project directory; then configure the development environment, test environment and production environment, etc.; re-encapsulate the request, configure the request method, and request parameters, methods, etc.; set timeout , Request interception; then introduce the corresponding API function on the page; ca...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More