CN117527823A - Request calling method, system and related device - Google Patents
Request calling method, system and related device Download PDFInfo
- Publication number
- CN117527823A CN117527823A CN202211665883.9A CN202211665883A CN117527823A CN 117527823 A CN117527823 A CN 117527823A CN 202211665883 A CN202211665883 A CN 202211665883A CN 117527823 A CN117527823 A CN 117527823A
- Authority
- CN
- China
- Prior art keywords
- request
- network
- modification
- configuration
- http
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 230000004048 modification Effects 0.000 claims abstract description 69
- 238000012986 modification Methods 0.000 claims abstract description 69
- 238000012545 processing Methods 0.000 claims abstract description 49
- 230000004044 response Effects 0.000 claims abstract description 34
- 230000010076 replication Effects 0.000 claims abstract description 12
- 238000004590 computer program Methods 0.000 claims description 12
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000000977 initiatory effect Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000003362 replicative effect Effects 0.000 description 1
- 230000004083 survival effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a request calling method, which comprises the following steps: receiving a network request; judging whether the network request is a modification request for an http request management class; if yes, copying the http request management class to obtain a copied body; and processing the modification request based on the replicator, and returning a request response result after the request processing is completed. When receiving a modification request for an http request management class, the method and the device copy the http request management class and then modify the replication body, and return a modification request result after the modification request is completed, and the original http request management class is not changed, so that the http request management class can be used for subsequent request call, the success rate of the http request under a high concurrency state is improved, and the maintainability and the expansibility of a program are improved. The application also provides a request calling system, a computer readable storage medium and a server, which have the beneficial effects.
Description
Technical Field
The present invention relates to the field of network data transmission, and in particular, to a method, a system, and a related device for invoking a request.
Background
The project network requests frequently call and modify the http request management class in a single instance, resulting in a possibility of modifying the request type or return type to a certain request when multiple requests are consecutively made. Other problems arise, such as multiple classes of calling base requests, concurrent requests, where one request modifies a request parameter, may cause another request to have a parameter error.
Therefore, how to avoid unnecessary modification of the http request management class by the network request is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The purpose of the application is to provide a request calling method, a request calling system, a computer readable storage medium and a server, which can realize frequent calling and modification request to an http request management class without changing the attribute of the http request management class.
In order to solve the technical problems, the application provides a request calling method, which comprises the following specific technical scheme:
receiving a network request;
judging whether the network request is a modification request for an http request management class;
if yes, copying the http request management class to obtain a copied body;
and processing the modification request based on the replicator, and returning a request response result after the request processing is completed.
Optionally, before receiving the modification request to the http request management class, the method further includes:
creating a network request configuration manager and setting configuration parameters of the network request configuration manager; the configuration parameters comprise any one or a combination of a plurality of any one of request header, request serialization, return serialization, parameter processing before request, request result processing and user-defined configuration;
creating a request class, and setting a request management configuration value in the request class by using the network request configuration manager; wherein the configuration value comprises a callback parameter of the copy body.
Optionally, before receiving the modification request to the http request management class, the method further includes:
determining request parameters;
creating the network request according to the request parameters by using the network request configuration manager; the request parameters include at least a request type, a result callback, and a callback of the configuration value copy entity.
Optionally, when the network request configuration manager creates a network request according to the request parameter, the method further includes:
judging whether the network request is a general call request or not;
if yes, configuring the configuration value of the network request as a default value;
if not, acquiring the request management configuration value in the request class and adding the request management configuration value into the custom configuration of the network request.
Optionally, determining whether the network request is a modification request to an http request management class includes:
judging whether the network request contains a configuration value processing parameter or not;
if yes, confirming that the network request is a modification request for the http request management class.
Optionally, after the request response result is returned after the request processing is completed, the method further includes:
and adding the request response result to a result callback of the network request.
Optionally, the modification operation is performed on the replicator according to the modification request, and after the modification request is completed and the modification request result is returned, the method further includes:
and deleting the duplicates, and keeping the http request management class in a default state.
The application also provides a request calling system, comprising:
the request receiving module is used for receiving a network request;
the request judging module is used for judging whether the network request is a modification request of an http request management class;
the copying module is used for copying the http request management class to obtain a copying body when the judging result of the request judging module is yes;
and the request processing module is used for processing the modification request based on the replicator and returning a request response result after the request processing is completed.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method as described above.
The application also provides a server comprising a memory in which a computer program is stored and a processor which when calling the computer program in the memory implements the steps of the method as described above.
The application provides a request calling method, which comprises the following steps: receiving a network request; judging whether the network request is a modification request for an http request management class; if yes, copying the http request management class to obtain a copied body; and processing the modification request based on the replicator, and returning a request response result after the request processing is completed.
When receiving a modification request for an http request management class, the method and the device copy the http request management class and then modify the replication body, and return a modification request result after the modification request is completed, and the original http request management class is not changed, so that the http request management class can be used for subsequent request call, the success rate of the http request under a high concurrency state is improved, and the maintainability and the expansibility of a program are improved.
The application further provides a request calling system, a computer readable storage medium and a server, which have the above beneficial effects and are not described herein.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings may be obtained according to the provided drawings without inventive effort to a person skilled in the art.
FIG. 1 is a flowchart of a method for requesting invocation according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a request calling system according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Referring to fig. 1, fig. 1 is a flowchart of a request calling method according to an embodiment of the present application, where the request calling method includes:
s101: receiving a network request;
this step directly receives the network request, which is not limited in terms of how the network request is received, and what network request is received, and the network request may be a call request or a call back request involved in the project operation process, and so on. Meanwhile, the specific format of the received network request is not limited, as long as the network request is in an identifiable format.
S102: judging whether the network request is a modification request for an http request management class; if yes, go to S103;
this step aims at determining whether the network request is a modification request to the http request management class. In part of the network request, the http request management class needs to be invoked and modified. In a high concurrency application scenario, a plurality of network requests are consecutive, and a situation that a result response error occurs between the network requests is easy to occur, for example, the network request a receives a response result of the network request B.
The step mainly judges whether the network request obtained in the step S101 includes modification to the http request management class, and if the network request is a network request requiring the http request management class, confirms that the network request is a modification request to the http request management class.
The method is not particularly limited in terms of how to judge whether the network request is a modification request for the http request management class, and when judging whether the network request is a modification request for the http request management class, the method can judge whether the network request contains parameters or functions for modifying the http request management class.
S103: copying the http request management class to obtain a copied body;
in order to avoid response errors between network requests, this step requires that the http request management class be replicated to obtain a replication body, and the replication process mainly includes replication of the name and parameters of the http request management class, so as to execute the corresponding network request.
The replicator may include various attributes of the http request management class, not specifically limited herein, such as time-out duration, base address of network request, and the like.
S104: and processing the modification request based on the replicator, and returning a request response result after the request processing is completed.
After the replication of the http request management class in the previous step is obtained, the modification request needs to be processed based on the replication, in other words, the actual application object of the modification request is the replication of the http request management class, and the modification request has no influence on the ontology of the http request management class. And after the modification request is processed by the replicator based on the http request management class, a corresponding request response result is returned.
It should be noted that, the replication entity of the http request management class is generally used to process a modification request, and the survival period of the replication entity starts for receiving a network request confirmed as a modification request, until the modification request processing is completed, and a response result is returned. The replicator of the http request management class can then be deleted. And deleting the replicator after the request response result is returned after the request processing is completed, and keeping the http request management class in a default state. I.e. the http request management class remains unchanged before and after receiving the network request, so that it can be used for the next request invocation.
When receiving a modification request for an http request management class, the embodiment of the application performs modification operation on a replication body after replicating the http request management class, returns a modification request result after the modification request is completed, does not change the original http request management class, and enables the http request management class to be used for subsequent request call, thereby improving success rate of http requests in a high concurrency state and increasing maintainability and expansibility of programs.
On the basis of the foregoing embodiment, as a preferred embodiment, in order to better implement performing a modification operation on the replicator of the http request management class and returning a response result, a configuration file may be defined in advance, so as to be convenient for managing the network request, and specifically, before receiving the modification request for the http request management class, the following steps may be performed:
a network request configuration manager, i.e. the requestmanageconfiguration, is created and configuration parameters of the network request configuration manager are set. Configuration parameters may include any one or a combination of any of a request header, a request serialization request sequencer, a return serialization reposseriaizer, a request pre-parameter handling request handler, a request result handling responseendler, and a custom configuration request rconfig.
Creating a request class, namely a RequestManager, and setting a request management configuration value in the request class by using the network request configuration manager; wherein the configuration value comprises a callback parameter of the copy body.
In addition, a project service configuration file, which may be named RequestConfig, may be created for customizing project service configuration parameters, including, but not limited to, token refresh status, whether loading is presented, whether to save actively stopped network requests. The token is a token serving the security mechanism of the project, needs to be refreshed at regular intervals, and indicates that an interface abnormality exists if the token is not refreshed at the designated time. Whether load is shown refers to whether the load state of the network request is shown in the page. By configuring the token refresh state in the project service configuration file, namely configuring project service parameters before a network request, the token refresh can be completed in a service, and the token refresh can be completed without being completed after the service is completed.
Meanwhile, a separate configuration file can be used for the request interface, which can be named as Response and is used for storing the request result and comprises error information of the successful request interface and the failed request.
After the file is created, if the project is first run, an initialization process is performed, that is, configuration parameters of the network request configuration manager are set, and the network request configuration manager is utilized to configure the request management configuration value configuration in the request class.
Serializing requests and return serialization refers to unifying the formats of requests and request responses. The pre-request parameter processing is to pre-process the network request, and the request result processing refers to the pre-process of the request result, mainly relating to the processes of format conversion of the network request and the request result, and the like.
The network request configuration manager can be used for carrying out basic configuration on the network requests, and simultaneously, the network request configuration manager can also be utilized to set the request parameters of each network request, namely, the parameter adjustment is directly carried out based on the network request configuration manager. The network requests can be processed by the same network library, unified basic configuration is realized, call requests and modification requests for http request management classes in a high concurrency state can be processed, and the expansibility is high.
The request class may include several parameters, such as an incoming request interface, parameters, a request management configuration value, and a request response result object, for recording the call state of the network request. Specifically, the method can include request types, interfaces, parameters required by the interfaces, file binaries, uploading progress of network requests, result callbacks of the network requests and configuration value processing parameters for executing callbacks of request management configuration value replicators. The out-call is NSURLSess DataTask, and the network request class.
After the initialization process is completed, a network request can be created. Specifically, the request parameters may be determined first, so that the network request is created by the network request configuration manager according to the request parameters. The specific content of the request parameter is not limited herein, and at least includes a request type request method, a callback of a result callback completionhandler, and a callback of a configuration value copy, that is, a callback of a request manager configuration corresponding to copy, and may further include parameters such as an interface url trig, an interface parameter parameters, and an upload progress of a network request. The request type refers to the type of network request and can be post, get, put, delete and the like. In particular, the request parameter includes a callback of the configuration value copying body, and the callback is used for recording a response result after processing after detecting that the network request is a modification request for the http request management class.
In addition, when the network request is created, whether the network request is a general call request or not can be judged, and the configuration value in the network request is set according to whether the judgment result is the general call request or not. The general call request mainly refers to a call request and a call back request. If the network request is a general call request, the configuration value of the network request can be configured to be a default value. Otherwise, the request management configuration value in the request class can be obtained and added to the custom configuration of the network request.
Based on the network request configuration manager and the request class created in this embodiment, another request invoking method procedure of the present application may be as follows:
the method comprises the steps of firstly, creating a network request manager and a request class, and setting a request management configuration value in a request; the request management configuration value is used for setting configuration attributes in the network request manager, so that the network request manager can conveniently create a network request;
secondly, creating a network request by using a network request manager, and creating the network request according to the request parameters; the request parameter contains callback of the configuration value copy body;
step three, executing network request call, judging whether the network request is a modification request for an http request management class, and specifically judging whether the network request contains configuration value processing parameters; if yes, entering a fourth step; if not, normally processing the network request by using the http request management class;
and fourthly, copying the http request management class to obtain a copying body, processing the network request by using the copying body, and calling back the response result to the callback parameter of the configuration value copying body in the network request. Thus, the process of processing the modification request by using the replicator is realized, and the http request management class is not changed. But the response result is the response result obtained after the replicator performs the modification request.
And when judging whether the network request is a modification request of the http request management class, judging whether the network request has a configurationHandler parameter. If the configuration object exists, the configuration object is obtained from the configuration handler parameter and is used as an http request management class. The configuration object at initialization is then replicated, and the configuration object replicator is used when processing network requests. If the configurationHandler parameter does not exist, which means that the http request management class does not need to be modified, the network request can be directly processed by using the default configurationobject.
Therefore, by applying the embodiment, even when frequent calls exist and http request management class modification requests are carried out in a high concurrency scene, the self attribute of the http request management class is not required to be modified and changed, and the request response result of network requests is prevented from being influenced by the change of the http request management class.
Taking iOS system as an example, when a request is initiated, it comprises the following steps:
firstly, creating NSURLSessionDatatask tasks to data task objects, and sequentially executing request serialization and response serialization according to request management configuration values;
specifically, the request serialization and the response serialization are sequentially executed according to the configuration object of the configuration handler parameter, parameters required by the network request are configured after that, the parameters including the request type, the configuration is performed according to the RequestMethod, the request header is obtained according to the head of the configuration object, the uploading progress of the network request is configured according to the uploading progress of the network request, and the callback object is set when the callback of the network request is successful or not. If the callback is successful, the callback result is processed by a responseHandler through the request result and is given to a Response file.
And secondly, configuring parameters required by the IOS network request, including request types and interfaces, and uploading progress, result callback and the like obtained according to the request management configuration values.
Whether a network request is initiated thereafter requires processing parameter decisions based on configuration values in the request management configuration values. Specifically, a configuration object can be obtained according to a configuration handler parameter in the network request, and the judgment can be performed according to the attribute of the requestHandler parameter in the configuration object. If the initiation of the network request is confirmed, the initiation of the network request, namely the data Task resume, can be executed, otherwise, the initiation of the network request is canceled, and the data Task cancel is executed.
If a network request is initiated, returning to the Response file according to the Response handler attribute in the configuration object.
It can be seen that this embodiment implements a unified basic configuration for each network request; in addition, each network request can also be subjected to parameter configuration by the network request configuration manager, so that independent configuration of the network request is realized, call requests and modification requests for http request management classes in a high concurrency state can be processed, the expansibility is high, and the network request configuration manager is convenient to transplant into other ios projects.
The following describes a request invoking system provided in the embodiments of the present application, and the request invoking system described below and the request invoking method described above may be referred to correspondingly.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a request calling system provided in an embodiment of the present application, and the present application further provides a request calling system, including:
the request receiving module is used for receiving a network request;
the request judging module is used for judging whether the network request is a modification request of an http request management class;
the copying module is used for copying the http request management class to obtain a copying body when the judging result of the request judging module is yes;
and the request processing module is used for processing the modification request based on the replicator and returning a request response result after the request processing is completed.
Based on the above embodiment, as a preferred embodiment, further comprising:
the configuration file creation module is used for creating a network request configuration manager and setting configuration parameters of the network request configuration manager; the configuration parameters comprise any one or a combination of a plurality of any one of request header, request serialization, return serialization, parameter processing before request, request result processing and user-defined configuration; creating a request class, and setting a request management configuration value in the request class by using the network request configuration manager; wherein the configuration value comprises a callback parameter of the copy body.
Based on the above embodiment, as a preferred embodiment, further comprising:
the request creation module is used for determining request parameters; creating the network request according to the request parameters by using the network request configuration manager; the request parameters include at least a request type, a result callback, and a callback of the configuration value copy entity.
Based on the above embodiment, as a preferred embodiment, further comprising:
the request type detection module is used for judging whether the network request is a general call request or not; if yes, configuring the configuration value of the network request as a default value; if not, acquiring the request management configuration value in the request class and adding the request management configuration value into the custom configuration of the network request.
Based on the above embodiments, as a preferred embodiment, the request judging module is a unit for judging whether the network request includes a configuration value processing parameter; and is used for confirming that the network request is a modification request for the http request management class when the judgment result is yes.
Based on the above embodiment, as a preferred embodiment, further comprising:
and the response result callback module is used for adding the request response result to the result callback of the network request.
Based on the above embodiment, as a preferred embodiment, further comprising:
and the duplicate deletion module is used for deleting the duplicate and keeping the http request management class in a default state.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when executed, implements the steps provided by the above embodiments. The storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The present application also provides a server, which may include a memory and a processor, where the memory stores a computer program, and the processor may implement the steps provided in the foregoing embodiments when calling the computer program in the memory. The server may of course also include various network interfaces, power supplies, etc.
The present application also provides an electronic device, referring to fig. 3, and as shown in fig. 3, a block diagram of an electronic device provided in an embodiment of the present application may include a processor 1410 and a memory 1420.
Processor 1410 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc., among others. The processor 1410 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 1410 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1410 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 1410 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 1420 may include one or more computer-readable storage media, which may be non-transitory. Memory 1420 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 1420 is used at least to store a computer program 1421, where the computer program can implement relevant steps in the request invoking method executed by the electronic device side as disclosed in any of the foregoing embodiments after being loaded and executed by the processor 1410. In addition, the resources stored by memory 1420 may include an operating system 1422, data 1423, and the like, and the storage may be transient storage or permanent storage. The operating system 1422 may include Windows, linux, android, among other things.
In some embodiments, the electronic device may further include a display 1430, an input-output interface 1440, a communication interface 1450, a sensor 1460, a power supply 1470, and a communication bus 1480.
Of course, the structure of the electronic device shown in fig. 3 does not limit the electronic device in the embodiment of the present application, and the electronic device may include more or fewer components than those shown in fig. 3 or may combine some components in practical applications.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. The system provided by the embodiment is relatively simple to describe as it corresponds to the method provided by the embodiment, and the relevant points are referred to in the description of the method section.
Specific examples are set forth herein to illustrate the principles and embodiments of the present application, and the description of the examples above is only intended to assist in understanding the methods of the present application and their core ideas. It should be noted that it would be obvious to those skilled in the art that various improvements and modifications can be made to the present application without departing from the principles of the present application, and such improvements and modifications fall within the scope of the claims of the present application.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. A method for requesting invocation, comprising:
receiving a network request;
judging whether the network request is a modification request for an http request management class;
if yes, copying the http request management class to obtain a copied body;
and processing the modification request based on the replicator, and returning a request response result after the request processing is completed.
2. The request invoking method according to claim 1, wherein prior to receiving the modification request to the http request management class, further comprising:
creating a network request configuration manager and setting configuration parameters of the network request configuration manager; the configuration parameters comprise any one or a combination of a plurality of any one of request header, request serialization, return serialization, parameter processing before request, request result processing and user-defined configuration;
creating a request class, and setting a request management configuration value in the request class by using the network request configuration manager; wherein the configuration value comprises a callback parameter of the copy body.
3. The request invoking method according to claim 2, wherein prior to receiving the modification request to the http request management class, further comprising:
determining request parameters;
creating the network request according to the request parameters by using the network request configuration manager; the request parameters include at least a request type, a result callback, and a callback of the configuration value copy entity.
4. The request invocation method of claim 3, wherein creating a network request from the request parameter using the network request configuration manager further comprises:
judging whether the network request is a general call request or not;
if yes, configuring the configuration value of the network request as a default value;
if not, acquiring the request management configuration value in the request class and adding the request management configuration value into the custom configuration of the network request.
5. The request invoking method according to claim 4, wherein determining whether the network request is a modification request to an http request management class comprises:
judging whether the network request contains a configuration value processing parameter or not;
if yes, confirming that the network request is a modification request for the http request management class.
6. The request invoke method of claim 3, further comprising, after returning the request response result after the request processing is completed:
and adding the request response result to a result callback of the network request.
7. The method according to any one of claims 1-6, wherein performing a modification operation on the replication body according to the modification request, and after returning a modification request result after the modification request is completed, further comprising:
and deleting the duplicates, and keeping the http request management class in a default state.
8. A request invocation system, comprising:
the request receiving module is used for receiving a network request;
the request judging module is used for judging whether the network request is a modification request of an http request management class;
the copying module is used for copying the http request management class to obtain a copying body when the judging result of the request judging module is yes;
and the request processing module is used for processing the modification request based on the replicator and returning a request response result after the request processing is completed.
9. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the request invoking method according to any of claims 1-7.
10. A server comprising a memory in which a computer program is stored and a processor which, when calling the computer program in the memory, implements the steps of the request calling method according to any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211665883.9A CN117527823A (en) | 2022-12-23 | 2022-12-23 | Request calling method, system and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211665883.9A CN117527823A (en) | 2022-12-23 | 2022-12-23 | Request calling method, system and related device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117527823A true CN117527823A (en) | 2024-02-06 |
Family
ID=89765126
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211665883.9A Pending CN117527823A (en) | 2022-12-23 | 2022-12-23 | Request calling method, system and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117527823A (en) |
-
2022
- 2022-12-23 CN CN202211665883.9A patent/CN117527823A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8458727B2 (en) | Asynchronous client to server updates | |
JP5941461B2 (en) | Shared data collection | |
US8418190B2 (en) | Responsive user interface with background application logic for working on an object | |
CA2798138C (en) | Sharing and synchronization of objects | |
US9218100B2 (en) | Method and system for partitioning asset management plugins | |
US10970052B2 (en) | System and method for enhancing component based development models with auto-wiring | |
CN111459610B (en) | Model deployment method and device | |
CN111666088A (en) | Pod replacement method and device, electronic equipment and computer-readable storage medium | |
CN115357369A (en) | CRD application integration calling method and device in k8s container cloud platform | |
US10719488B2 (en) | Configurable provider for layered repository | |
CN116360918A (en) | Modeling data processing method, modeling data processing device, computer equipment and storage medium | |
WO2022222303A1 (en) | Hdfs-based small file processing method and apparatus, medium and electronic device | |
US20200174804A1 (en) | Graphical User Interface Command Pattern | |
CN111240678B (en) | Pop-up window setting method and device, electronic equipment and storage medium | |
CN109614271A (en) | Control method, device, equipment and the storage medium of multiple company-data consistency | |
CN112395437B (en) | 3D model loading method and device, electronic equipment and storage medium | |
CN117527823A (en) | Request calling method, system and related device | |
CN112241398A (en) | Data migration method and system | |
CN115344371A (en) | Interface calling method and device, storage medium and computer equipment | |
CN114489674A (en) | Data verification method and device of dynamic data model | |
CN110297598B (en) | Data synchronization method and storage system | |
US20120185452A1 (en) | System and method for file coordination | |
CN116643846B (en) | Timed task processing method and device based on container cluster arrangement management platform | |
US20090313628A1 (en) | Dynamically batching remote object model commands | |
CN114615287B (en) | File backup method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |