CN112134910A - Network request debugging method, device, equipment and storage medium - Google Patents

Network request debugging method, device, equipment and storage medium Download PDF

Info

Publication number
CN112134910A
CN112134910A CN201910553674.7A CN201910553674A CN112134910A CN 112134910 A CN112134910 A CN 112134910A CN 201910553674 A CN201910553674 A CN 201910553674A CN 112134910 A CN112134910 A CN 112134910A
Authority
CN
China
Prior art keywords
network request
debugging
application program
instance
network
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.)
Granted
Application number
CN201910553674.7A
Other languages
Chinese (zh)
Other versions
CN112134910B (en
Inventor
刘泽祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910553674.7A priority Critical patent/CN112134910B/en
Publication of CN112134910A publication Critical patent/CN112134910A/en
Application granted granted Critical
Publication of CN112134910B publication Critical patent/CN112134910B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Abstract

The invention provides a network request debugging method, a device, equipment and a storage medium, wherein a network request sent by an application program and/or a network request received by the application program are intercepted in the application program; debugging the network request according to preset debugging parameters; and after the debugging operation is completed, releasing the network request. The network request is intercepted in the application program during debugging, additional debugging equipment for debugging is not needed, the operation steps of the debugging process are simplified, a local area network is not needed to be established, complex setting is not needed, and dependence on network environment safety during network request acquisition in the debugging process can be avoided; the network request sent and/or received by the application program in any network environment can be obtained, and the application program can be debugged in any network environment; for the network request of the HTTPS protocol, a related certificate of a debugging tool does not need to be installed, and the trust problem in the debugging process is solved.

Description

Network request debugging method, device, equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for network request debugging.
Background
With the progress of technology, more and more traditional services start to migrate to terminals such as mobile phones and tablet computers on a large scale, and therefore more and more Applications (APPs) are developed, and in the process of developing the applications, it is usually necessary to debug the network request of the applications based on the network request of the applications so as to check the correctness of various information such as the data format, the calling mode, the request result, and the like of the network request.
In the prior art, when a network request of an application program is debugged, the application program needs to be installed on a debugged terminal, then the debugged terminal is connected to the same local area network where a debugging device (such as a computer with a debugging tool installed) is located, and a network proxy of the debugged terminal is set as an IP address of the local area network and a port opened by the debugging tool, so that all network requests sent and received by the application program on the debugged terminal are sent to the debugging device in a proxy manner, and are forwarded by the debugging device, and the network requests are recorded to debug the network request of the application program.
In the network request debugging method in the prior art, a debugged terminal with an application program installed therein must be in the same local area network as a debugging device, and the debugged terminal usually needs to be connected with the local area network in a Wireless-Fidelity (WiFi) mode or the like, so that the debugging of the application program in a cellular mobile network environment cannot be satisfied; in addition, in the network request debugging method in the prior art, after the network request is sent from the application program, the network request needs to pass through a network card of the debugged terminal, a local area network switch, a network card of the debugging device and other stages, so that the risk of tampering the network request exists, and the network request debugging method in the prior art has higher requirements on the security of the network environment; in addition, complex operations such as setting a network agent, installing a relevant certificate of a debugging tool and the like are required to be performed on the debugged terminal during debugging, and particularly for the encrypted network request of the HTTPS protocol, the debugging tool can be trusted only if the relevant certificate of the debugging tool is installed, so that the content of the encrypted network request of the HTTPS protocol can be acquired, the complexity of debugging operations of the application program is increased, and the debugging efficiency is reduced.
Disclosure of Invention
The invention provides a network request debugging method, a network request debugging device, network request debugging equipment and a storage medium, which are used for intercepting a network request in an application program, simplifying the operation of a debugging process and improving the convenience and the debugging efficiency of the network request debugging process.
The first aspect of the present invention provides a network request debugging method, including:
intercepting a network request sent by an application program and/or a network request received by the application program inside the application program;
debugging the network request according to preset debugging parameters;
and after the debugging operation is completed, releasing the network request.
A second aspect of the present invention provides a network request debugging apparatus, including:
the intercepting module is used for intercepting a network request sent by the application program and/or a network request received by the application program in the application program;
the debugging module is used for carrying out debugging operation on the network request according to preset debugging parameters;
the interception module is further configured to release the network request after the debugging operation is completed.
A third aspect of the present invention provides a network request debugging device, including:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of the first aspect.
A fourth aspect of the present invention is to provide a computer-readable storage medium having stored thereon a computer program; which when executed by a processor implements the method according to the first aspect.
According to the network request debugging method, the network request debugging device, the network request debugging equipment and the storage medium, the network request sent by the application program and/or the network request received by the application program are intercepted in the application program; debugging the network request according to preset debugging parameters; and after the debugging operation is completed, releasing the network request. The network request is intercepted in the application program during debugging, so that additional debugging equipment for debugging is not needed to be configured, the debugged terminal is not needed to be connected to the debugging equipment through a local area network, and the debugging equipment is used for acquiring the network request sent by the application program on the debugged terminal and/or the received network request, the operation steps of the debugging process are simplified, the local area network is not needed to be established, complex setting is not needed, and the dependence on the network environment safety during the network request acquisition in the debugging process can be avoided; meanwhile, as the network requests sent and/or received by the application program in any network environment can be acquired, the debugging process is not limited to single network environments such as WiFi, and the like, and the application program can be debugged in any network environment; in addition, for the network request of the HTTPS protocol, a related certificate of a debugging tool does not need to be installed on the debugged terminal, and the trust problem in the debugging process is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a network request debugging method according to an embodiment of the present invention;
fig. 2 is a structural diagram of a network request debugging apparatus according to an embodiment of the present invention;
fig. 3 is a structural diagram of a network request debugging device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a network request debugging method according to an embodiment of the present invention. The embodiment provides a network request debugging method, which comprises the following specific steps:
s101, intercepting a network request sent by the application program and/or a network request received by the application program in the application program.
In this embodiment, when a service module in an application configured on a terminal triggers a network request, for example, when the application is started, the application needs to request data of a home page, the application needs to initiate a network request for requesting the data of the home page to a server, and the network request initiated by the application is intercepted inside the application, and is not directly sent to the server from the application; when the application program on the terminal receives a network request, for example, when the application program on the terminal receives a network request sent by a server (the network request may be a response of the server to a network request previously sent by the application program), the received network request is also intercepted inside the application program first, and the network request is not directly transmitted to a corresponding service module in the application program for service processing. In this embodiment, it is not necessary to additionally configure a debugging device (a computer, etc.) for debugging, so that it is also not necessary to connect the debugged terminal to the debugging device through the local area network, and then the debugging device obtains the network request sent by the application installed on the debugged terminal and/or the received network request.
And S102, debugging the network request according to preset debugging parameters.
In this embodiment, after the network request sent and/or received by the application program is obtained, a debugging operation of the network request may be performed, which may include recording parameters, data debugging, and the like, and more specifically, the correctness of each item of information such as a data format, a calling manner, a request result, and the like of the network request may be detected, and when an error is detected, a syntax error or a logic error is corrected for the application program. In this embodiment, the preset debugging parameter may be preset, for example, the debugging range is defined by the preset debugging parameter, such as debugging a network request of a certain interface in the application program, or debugging a certain type of network request in the application program, and the like. The specific debugging process may adopt a debugging method in the prior art, and is not described herein again.
S103, after the debugging operation is completed, the network request is released.
In this embodiment, after completing the debugging, the intercepted network request may be released, that is, if the network request sent by the application program is intercepted, the network request is continuously sent; and if the network request received by the application program is intercepted, the network request is continuously transmitted to the corresponding service module of the application program so as to carry out subsequent service processing.
It should be noted that, in this embodiment, the network requests sent by the application program and all the received network requests may be intercepted, then only some of the network requests are debugged according to the preset debugging parameters, and other network requests are directly released, and the debugged network requests are released after the debugging operation is completed; in addition, in this embodiment, the network request sent by the application and/or a part of the received network requests may also be directly intercepted according to the preset debugging parameters, for example, only the hypertext transfer protocol HTTP request or the hypertext transfer security protocol HTTPs request is intercepted, the network requests are released after the debugging operation is completed, and other network requests are not intercepted.
In the network request debugging method provided by this embodiment, a network request sent by an application program and/or a network request received by the application program is intercepted inside the application program; debugging the network request according to preset debugging parameters; and after the debugging operation is completed, releasing the network request. In the embodiment, because the network request is intercepted in the application program during debugging, additional debugging equipment for debugging is not needed, so that the debugged terminal is not needed to be connected to the debugging equipment through the local area network, and the debugging equipment is used for acquiring the network request sent by the application program on the debugged terminal and/or the received network request, thereby simplifying the operation steps of the debugging process, avoiding the establishment of the local area network and the complicated setting, and avoiding the dependence on the network environment safety when the debugging process acquires the network request; meanwhile, as the network requests sent and/or received by the application program in any network environment can be acquired, the debugging process is not limited to single network environments such as WiFi, and the like, and the application program can be debugged in any network environment; in addition, for the network request of the HTTPS protocol, a related certificate of a debugging tool does not need to be installed on the debugged terminal, and the trust problem in the debugging process is solved.
On the basis of the foregoing embodiment, the intercepting, inside the application program, the network request sent by the application program and/or the network request received by the application program in S101 may include:
intercepting a network request sent by the application program and/or a network request received by the application program through a network request interceptor in a debugging engine which is created in the application program in advance.
In this embodiment, before debugging, a debugging engine needs to be created in the application in advance, the debugging engine has a network request interceptor, and during debugging, the network request interceptor can be used to intercept a network request sent by the application and/or a network request received by the application in the application.
Further, the intercepting, inside the application program, the network request sent by the application program and/or the network request received by the application program in S101 includes:
and intercepting a network request sent by the application program and/or a network request received by the application program in the application program according to the preset debugging parameters.
In this embodiment, the network request to be intercepted may be defined by presetting the debugging parameters, for example, intercepting a network request of a certain interface in the application program, or intercepting a network request of a certain type (such as an HTTP request and/or an HTTPs request) in the application program, and the like, and for other network requests, the network request may not be intercepted or may be directly released after being intercepted.
On the basis of any of the above embodiments, before the intercepting, inside an application, a network request sent by the application and/or a network request received by the application at S101, the method further includes:
creating the debug engine within the application.
In this embodiment, since a network request sent by the application and/or a network request received by the application needs to be intercepted inside the application during debugging, a debugging engine having a network request interceptor needs to be created inside the application in advance before debugging. Alternatively, the debug engine may be developed in advance and packaged into an SDK (Software Development Kit); when a network request of a certain application program needs debugging, the application program is accessed to the SDK of the debugging engine.
In an alternative embodiment, for an iOS operating system (mobile operating system developed by apple inc.), the creating the debug engine inside the application includes:
for an iOS operating system, creating an instance of the debug engine within the application, creating a global network proxy instance in the instance of the debug engine, and using the global network proxy instance as the network request interceptor in the debug engine.
In this embodiment, the global network proxy instance is used as a network request interceptor in the debugging engine, and during the debugging process, the global network proxy instance intercepts network requests sent and/or received by the application program.
The global network proxy instance in this embodiment may be an NSURLProtocol instance. NSURLProtocol is a global proxy virtual base class provided by the network bottom layer of the iOS operating system, and can realize customized request and response, provide customized global cache support, redirect network requests, provide HTTP padding and other global network request modification requirements. In this embodiment, a network request global proxy inside the application program may be created by using NSURLProtocol, and specifically, a network request sent and/or received by the application program may be intercepted by inheriting subclassing. Furthermore, a network request to be intercepted may be defined for a NSURLProtocol instance, for example, a network request intercepting a certain interface in an application, or a network request of a certain type in an application (such as an HTTP request and/or an HTTPs request), etc.
Further, when the debugging engine is started, first, preset debugging parameters are obtained, and the global network agent instance is initialized. The initialized global network agent instance can intercept network requests sent and/or received by the application program in the debugging process, the debugging engine carries out debugging operation on the intercepted network requests according to preset debugging parameters, and the network requests are released after the debugging operation is finished.
In another alternative embodiment, for the Android operating system (operating system developed by Google corporation), the creating the debug engine inside the application includes:
for an Android operating system, creating an instance of a debugging engine in the application program, and adding a network request tool class instance in the instance of the debugging engine;
and creating an instance of a network request interceptor according to the preset debugging parameters, and adding the instance of the network request interceptor into an interception attribute list of the instance of the network request tool class so as to complete the creation of the network request interceptor.
In this embodiment, in the case of adding the network request tool instance to the debug engine, it may be implemented that the debug engine has a function of receiving and sending a network request, and after adding the instance of the network request interceptor to the interception attribute list of the network request tool instance, the network request sent and/or received by the application program may be intercepted by running the instance of the network request interceptor, and then the debug engine may perform a debugging operation on the intercepted network request according to preset debugging parameters, and after completing the debugging operation, the network request is released by the network request tool instance, that is, the network request sent by the application program is continuously sent, and the network request received by the application program is transmitted to the corresponding service module of the application program, so as to perform subsequent service processing.
Further, the adding the instance of the network request interceptor to the interception attribute list of the instance of the network request tool class includes:
and acquiring an interception attribute list of the network request tool class instance through a reflection mechanism, and dynamically adding the instance of the network request interceptor into the interception attribute list.
In this embodiment, all instances of the network request interceptor are maintained in the interception attribute list of the network request tool class instance, the interception attribute list of the network request tool class instance may be dynamically obtained through a reflection mechanism of Java language, and then the pre-created instances of the network request interceptor are dynamically added to the interception attribute list of the network request tool class instance through the reflection mechanism. The reflection mechanism is a characteristic of Java language, and is a function of a method capable of dynamically acquiring information and dynamically calling an object, the dynamic acquisition of an interception attribute list and the dynamic addition of an instance of a network request interceptor can be realized by adopting the reflection mechanism in the embodiment, the dynamic addition of the instance of the network request interceptor can be realized at any stage in a debugging process, the debugging process does not need to be suspended, complicated setting and encoding of an interception program do not need to be carried out, and the operation steps of the debugging process are simplified.
In the network request debugging method provided by this embodiment, a network request sent by an application program and/or a network request received by the application program is intercepted inside the application program; debugging the network request according to preset debugging parameters; and after the debugging operation is completed, releasing the network request. In the embodiment, because the network request is intercepted in the application program during debugging, additional debugging equipment for debugging is not needed, so that the debugged terminal is not needed to be connected to the debugging equipment through the local area network, and the debugging equipment is used for acquiring the network request sent by the application program on the debugged terminal and/or the received network request, thereby simplifying the operation steps of the debugging process, avoiding the establishment of the local area network and the complicated setting, and avoiding the dependence on the network environment safety when the debugging process acquires the network request; meanwhile, as the network requests sent and/or received by the application program in any network environment can be acquired, the debugging process is not limited to single network environments such as WiFi, and the like, and the application program can be debugged in any network environment; in addition, for the network request of the HTTPS protocol, a related certificate of a debugging tool does not need to be installed on the debugged terminal, and the trust problem in the debugging process is solved.
Fig. 2 is a structural diagram of a network request debugging apparatus according to an embodiment of the present invention. The network request debugging apparatus provided in this embodiment may execute the processing flow provided in the network request debugging method embodiment, as shown in fig. 2, where the network request debugging apparatus 20 includes: an interception module 21 and a debugging module 22.
An interception module 21, configured to intercept, inside an application program, a network request sent by the application program and/or a network request received by the application program;
the debugging module 22 is used for carrying out debugging operation on the network request according to preset debugging parameters;
the intercepting module 21 is further configured to release the network request after the debugging operation is completed.
Further, the intercepting module 21 is configured to:
intercepting a network request sent by the application program and/or a network request received by the application program through a network request interceptor in a debugging engine which is created in the application program in advance.
Further, the intercepting module 21 is configured to:
and intercepting a network request sent by the application program and/or a network request received by the application program in the application program according to the preset debugging parameters.
Further, the apparatus further comprises a creating module configured to:
before intercepting a network request sent by the application program and/or a network request received by the application program inside the application program, creating the debugging engine inside the application program.
Optionally, the creating module is configured to:
for an iOS operating system, creating an instance of the debug engine within the application, creating a global network proxy instance in the instance of the debug engine, and using the global network proxy instance as the network request interceptor in the debug engine.
Further, the global network proxy instance is a NSURLProtocol instance.
Optionally, the creating module is configured to:
for an Android operating system, creating an instance of a debugging engine in the application program, and adding a network request tool class instance in the instance of the debugging engine;
and creating an instance of a network request interceptor according to the preset debugging parameters, and adding the instance of the network request interceptor into an interception attribute list of the instance of the network request tool class so as to complete the creation of the network request interceptor.
Further, the creation module is configured to:
and acquiring an interception attribute list of the network request tool class instance through a reflection mechanism, and dynamically adding the instance of the network request interceptor into the interception attribute list.
The network request debugging apparatus provided in the embodiment of the present invention may be specifically configured to execute the method embodiment provided in fig. 1, and specific functions are not described herein again.
The network request debugging device provided by the embodiment of the invention intercepts the network request sent by the application program and/or the network request received by the application program in the application program; debugging the network request according to preset debugging parameters; and after the debugging operation is completed, releasing the network request. In the embodiment, because the network request is intercepted in the application program during debugging, additional debugging equipment for debugging is not needed, so that the debugged terminal is not needed to be connected to the debugging equipment through the local area network, and the debugging equipment is used for acquiring the network request sent by the application program on the debugged terminal and/or the received network request, thereby simplifying the operation steps of the debugging process, avoiding the establishment of the local area network and the complicated setting, and avoiding the dependence on the network environment safety when the debugging process acquires the network request; meanwhile, as the network requests sent and/or received by the application program in any network environment can be acquired, the debugging process is not limited to single network environments such as WiFi, and the like, and the application program can be debugged in any network environment; in addition, for the network request of the HTTPS protocol, a related certificate of a debugging tool does not need to be installed on the debugged terminal, and the trust problem in the debugging process is solved.
Fig. 3 is a schematic structural diagram of a network request debugging device according to an embodiment of the present invention. The network request debugging device provided by the embodiment of the present invention may execute the processing flow provided by the network request debugging method embodiment, as shown in fig. 3, the network request debugging device 30 includes a memory 31, a processor 32, a computer program, and a communication interface 33; wherein the computer program is stored in the memory 31 and configured to be executed by the processor 32 for the network request debugging method described in the above embodiments.
In particular, the processor 32 is configured to run the computer program stored in the memory 31 to implement:
intercepting a network request sent by an application program and/or a network request received by the application program inside the application program;
debugging the network request according to preset debugging parameters;
and after the debugging operation is completed, releasing the network request.
The network request debugging device in the embodiment shown in fig. 3 may be used to implement the technical solution of the above method embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
In addition, the present embodiment also provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the network request debugging method described in the above embodiment.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus an application program functional unit.
The integrated unit implemented in the form of the application function unit may be stored in a computer-readable storage medium. The application functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (14)

1. A network request debugging method is characterized by comprising the following steps:
intercepting a network request sent by an application program and/or a network request received by the application program inside the application program;
debugging the network request according to preset debugging parameters;
and after the debugging operation is completed, releasing the network request.
2. The method according to claim 1, wherein intercepting, inside an application, a network request issued by the application and/or a network request received by the application comprises:
intercepting a network request sent by the application program and/or a network request received by the application program through a network request interceptor in a debugging engine which is created in the application program in advance;
before the network request sent by the application program and/or the network request received by the application program is intercepted inside the application program, the method further comprises the following steps:
creating the debug engine within the application.
3. The method according to claim 2, wherein intercepting, inside an application, a network request issued by the application and/or a network request received by the application comprises:
and intercepting a network request sent by the application program and/or a network request received by the application program in the application program according to the preset debugging parameters.
4. The method of claim 2 or 3, wherein creating the debug engine internal to the application comprises:
for an iOS operating system, creating an instance of the debug engine within the application, creating a global network proxy instance in the instance of the debug engine, and using the global network proxy instance as the network request interceptor in the debug engine.
5. The method of claim 2 or 3, wherein creating the debug engine internal to the application comprises:
for an Android operating system, creating an instance of a debugging engine in the application program, and adding a network request tool class instance in the instance of the debugging engine;
and creating an instance of a network request interceptor according to the preset debugging parameters, and adding the instance of the network request interceptor into an interception attribute list of the instance of the network request tool class so as to complete the creation of the network request interceptor.
6. The method according to claim 5, wherein said adding the instance of the network request interceptor to the list of interception attributes of the instance of the network request tool class comprises:
and acquiring an interception attribute list of the network request tool class instance through a reflection mechanism, and dynamically adding the instance of the network request interceptor into the interception attribute list.
7. A network request debugging apparatus, comprising:
the intercepting module is used for intercepting a network request sent by the application program and/or a network request received by the application program in the application program;
the debugging module is used for carrying out debugging operation on the network request according to preset debugging parameters;
the interception module is further configured to release the network request after the debugging operation is completed.
8. The apparatus of claim 7, wherein the interception module is configured to:
intercepting a network request sent by the application program and/or a network request received by the application program through a network request interceptor in a debugging engine which is created in the application program in advance;
the device further comprises:
the creating module is used for creating the debugging engine in the application program before intercepting the network request sent by the application program and/or the network request received by the application program in the application program.
9. The apparatus of claim 8, wherein the interception module is configured to:
and intercepting a network request sent by the application program and/or a network request received by the application program in the application program according to the preset debugging parameters.
10. The apparatus of claim 8 or 9, wherein the creation module is configured to:
for an iOS operating system, creating an instance of the debug engine within the application, creating a global network proxy instance in the instance of the debug engine, and using the global network proxy instance as the network request interceptor in the debug engine.
11. The apparatus of claim 8 or 9, wherein the creation module is configured to:
for an Android operating system, creating an instance of a debugging engine in the application program, and adding a network request tool class instance in the instance of the debugging engine;
and creating an instance of a network request interceptor according to the preset debugging parameters, and adding the instance of the network request interceptor into an interception attribute list of the instance of the network request tool class so as to complete the creation of the network request interceptor.
12. The apparatus of claim 11, wherein the creation module is configured to:
and acquiring an interception attribute list of the network request tool class instance through a reflection mechanism, and dynamically adding the instance of the network request interceptor into the interception attribute list.
13. A network request debugging device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-6.
14. A computer-readable storage medium, having stored thereon a computer program;
the computer program, when executed by a processor, implementing the method of any one of claims 1-6.
CN201910553674.7A 2019-06-25 2019-06-25 Network request debugging method, device, equipment and storage medium Active CN112134910B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910553674.7A CN112134910B (en) 2019-06-25 2019-06-25 Network request debugging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910553674.7A CN112134910B (en) 2019-06-25 2019-06-25 Network request debugging method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112134910A true CN112134910A (en) 2020-12-25
CN112134910B CN112134910B (en) 2024-01-12

Family

ID=73849139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910553674.7A Active CN112134910B (en) 2019-06-25 2019-06-25 Network request debugging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112134910B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030088807A1 (en) * 2001-11-07 2003-05-08 Mathiske Bernd J.W. Method and apparatus for facilitating checkpointing of an application through an interceptor library
CN106708717A (en) * 2015-07-17 2017-05-24 腾讯科技(北京)有限公司 Development debugging method and device
CN108521444A (en) * 2018-03-19 2018-09-11 五八有限公司 A kind of Networked E-Journals method, apparatus and computer readable storage medium
CN109542758A (en) * 2018-09-29 2019-03-29 中国平安人寿保险股份有限公司 Application program fault-tolerant ability test method, device, computer readable storage medium
CN109614340A (en) * 2018-12-28 2019-04-12 北京微播视界科技有限公司 Exploitation adjustment method, device, electronic equipment and the storage medium of application program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030088807A1 (en) * 2001-11-07 2003-05-08 Mathiske Bernd J.W. Method and apparatus for facilitating checkpointing of an application through an interceptor library
CN106708717A (en) * 2015-07-17 2017-05-24 腾讯科技(北京)有限公司 Development debugging method and device
CN108521444A (en) * 2018-03-19 2018-09-11 五八有限公司 A kind of Networked E-Journals method, apparatus and computer readable storage medium
CN109542758A (en) * 2018-09-29 2019-03-29 中国平安人寿保险股份有限公司 Application program fault-tolerant ability test method, device, computer readable storage medium
CN109614340A (en) * 2018-12-28 2019-04-12 北京微播视界科技有限公司 Exploitation adjustment method, device, electronic equipment and the storage medium of application program

Also Published As

Publication number Publication date
CN112134910B (en) 2024-01-12

Similar Documents

Publication Publication Date Title
US10044572B1 (en) Dynamic addition of network function services
US20180144140A1 (en) Method, client, and system for testing application
CN109391676B (en) Terminal device control method, terminal device, and computer-readable storage medium
US20160261693A1 (en) Cloud-based data backup and operation method and system
CN113190464B (en) mock testing method and device, electronic equipment and medium
US20170102957A1 (en) System and Method for Trusted Operability When Moving Between Network Functions Virtualization States
US10171502B2 (en) Managed applications
US11165888B1 (en) Image acquisition device virtualization for remote computing
CN109889468B (en) Network data transmission method, system, device, equipment and storage medium
US10282719B1 (en) Secure and trusted device-based billing and charging process using privilege for network proxy authentication and audit
US20160342788A1 (en) Generating packages for managed applications
EP3298534A1 (en) Creating multiple workspaces in a device
WO2023083071A1 (en) View interaction method and apparatus, electronic device, and computer readable medium
US20220327044A1 (en) Generating a software application
US11736578B2 (en) Managing a software application
CN111953718A (en) Page debugging method and device
US10631177B1 (en) Mobile phone chipset parameter adaptation framework
US11757976B2 (en) Unified application management for heterogeneous application delivery
CN112134910B (en) Network request debugging method, device, equipment and storage medium
WO2018121652A1 (en) Method and device for connecting wireless access point through application in user equipment
US9609080B2 (en) Systems and methods for device identity delegation for application software
CN110737911A (en) Data processing method, device and computer readable storage medium
CN115037572B (en) Application request identification method and device
KR102232951B1 (en) Back-end service platform device
US11909720B2 (en) Secure remote support of systems deployed in a private network

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
GR01 Patent grant
GR01 Patent grant