Network request sending method of dependency relationship, terminal device and storage medium
A technology of network requests and dependencies, applied in the computer field, can solve the problem of code redundancy in the initiation method, and achieve the effect of facilitating later maintenance, simplifying logical relationships, and reducing code redundancy.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0025] see figure 1 , a schematic flowchart of a method for collecting network performance parameters provided by an embodiment of the present invention, including the following steps:
[0026] S101. When the user initiates a network request, store the network request objects with dependencies in a predefined array;
[0027] The network request is generally a data request sent by the client to the server through the network, and each data request is initiated by sending a corresponding network request object. In the embodiment of the present invention, a network request class is defined, and a network request object is generated by instantiating the class, and the server-side response data is transmitted back to the client through the network request object. Preferably, the network request is a network request in IOS.
[0028] The dependency relationship refers to two network requests. The initiation of one network request depends on the successful initiation and response of...
Embodiment 2
[0042] exist figure 1 On the basis of the program code as an example, combined with figure 2 The specific implementation process of processing network requests is described in detail as follows:
[0043] After the user initiates a network request, the client sends the request data to the server through the request object, and the server returns the response data to the client. In the embodiment of the present invention, the network request object can not only carry the initiation data, but also receive the response data , returns the response result.
[0044] S201. Object-based encapsulation of network requests
[0045]When a user initiates a network request, the network request needs to be objectified and encapsulated through a predefined class to generate a network request object. Generally, the network request object will carry various request parameters to initiate a request to the server.
[0046] Exemplarily, first create a network request class named 'DYRequest', d...
Embodiment 3
[0064] A network request method is mainly described above, and a network request terminal device will be described in detail below.
[0065] image 3 A schematic diagram showing the structure of a terminal device sending a network request of dependencies, including:
[0066] Storage module 310: used for storing network request objects with dependencies into a predefined array when a user initiates a network request;
[0067] The network request is generally a data request sent by the client to the server through the network, and each data request is initiated by sending a corresponding network request object. In the embodiment of the present invention, a network request class is defined, and a network request object is generated by instantiating the class, and the server-side response data is transmitted back to the client through the network request object. Preferably, the network request is a network request in IOS. The dependency relationship refers to two network reques...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com