CN112134910B - 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
CN112134910B
CN112134910B CN201910553674.7A CN201910553674A CN112134910B CN 112134910 B CN112134910 B CN 112134910B CN 201910553674 A CN201910553674 A CN 201910553674A CN 112134910 B CN112134910 B CN 112134910B
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.)
Active
Application number
CN201910553674.7A
Other languages
Chinese (zh)
Other versions
CN112134910A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a network request debugging method, a device, equipment and a storage medium, which intercept a network request sent by an application program and/or a network request received by the application program in the application program; according to preset debugging parameters, carrying out debugging operation on the network request; and after the debugging operation is completed, releasing the network request. According to the invention, the network request is intercepted in the application program during debugging, and the debugging equipment for debugging is not required to be additionally configured, so that the operation steps of the debugging process are simplified, a local area network is not required to be built, complex setting is not required, and the dependence on the network environment safety during the 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 debugging tool related certificate 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 debugging a network request.
Background
With the progress of technology, more and more traditional services are migrated to terminals such as mobile phones and tablet computers on a large scale, so more and more Application programs (APP) are developed, and in the development process of the Application programs, debugging is usually required to be performed on the network request of the Application program based on the network request of the Application program so as to check the correctness of various information such as data format, calling mode and request result of the network request.
In the prior art, when a network request of an application program is debugged, the application program is required 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 provided with a debugging tool) 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 mode, and forwarded by the debugging device, and meanwhile, 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 provided with an application program and debugging equipment are in the same local area network, and the debugged terminal can be connected with the local area network usually in a Wireless-Fidelity (WiFi) mode and the like, so that the debugging of the application program in a cellular mobile network environment cannot be met; 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 plurality of stages such as a network card of a debugged terminal, a local area network switch, a network card of debugging equipment and the like, 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 safety of a network environment; in addition, when in debugging, complex operations such as setting a network proxy, installing related certificates of a debugging tool and the like are needed for the debugged terminal, especially for an encrypted network request of the HTTPS protocol, only the related certificates of the debugging tool are installed, the debugging tool can be trusted, and then the content of the encrypted network request of the HTTPS protocol can be acquired, so that the complexity of the debugging operation of an application program is increased, and the debugging efficiency is reduced.
Disclosure of Invention
The invention provides a network request debugging method, device, equipment and 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.
A first aspect of the present invention provides a network request debug method, including:
intercepting a network request sent by an application program and/or a network request received by the application program in the application program;
according to preset debugging parameters, carrying out debugging operation on the network request;
and after the debugging operation is completed, releasing the network request.
A second aspect of the present invention provides a network request debugging device, including:
the interception 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 also used for releasing the network request after the debugging operation is completed.
A third aspect of the present invention provides 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 according to the first aspect.
A fourth aspect of the present invention is to provide a computer-readable storage medium having a computer program stored thereon; the computer program, when executed by a processor, implements the method as described in the first aspect.
According to the network request debugging method, the device, the equipment and the storage medium, the network request sent by the application program and/or the network request received by the application program is intercepted in the application program; according to preset debugging parameters, carrying out debugging operation on the network request; and after the debugging operation is completed, releasing the network request. According to the invention, the network request is intercepted in the application program during debugging, so that the debugging equipment for debugging is not required to be additionally configured, the terminal to be debugged is not required to be connected to the debugging equipment through the local area network, and the network request sent by the application program on the terminal to be debugged and/or the received network request are acquired by the debugging equipment, so that the operation steps of the debugging process are simplified, the local area network is not required to be built, complex setting is not required, and the dependence on the network environment safety during the network request acquisition in the debugging process can be avoided; meanwhile, as the network request sent and/or received by the application program in any network environment can be obtained, the debugging process is not limited to a single network environment 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, the related certificate of the debugging tool does not need to be installed on the debugged terminal, so that the trust problem in the debugging process is solved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a flow chart of a network request debugging method provided by an embodiment of the invention;
fig. 2 is a block diagram of a network request debugging device according to an embodiment of the present invention;
fig. 3 is a block diagram of a network request debug apparatus according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the 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 an 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 program configured on a terminal triggers a network request, for example, when the application program is started, data of a first page needs to be requested, and then the application program needs to initiate a network request for requesting the data of the first page to a server, and the network request initiated by the application program is intercepted inside the application program and is not directly sent from the application program to the server; when an application program on the terminal receives a network request, for example, when the application program on the terminal receives the network request sent by the server (the network request may be a response of the server to the application program in the previously sent network request), the received network request is also intercepted in the application program, and the network request is not directly transferred to a corresponding service module in the application program for service processing. In this embodiment, there is no need to additionally reconfigure a debugging device (such as a computer) for debugging, so that there is no need to connect a terminal to be debugged to the debugging device through a lan, and then the debugging device obtains a network request issued by an application program installed on the terminal to be debugged and/or a received network request.
S102, according to preset debugging parameters, debugging operation is carried out on the network request.
In this embodiment, after obtaining a network request sent and/or received by an application program, a debugging operation of the network request may be performed, which may include recording parameters, data debugging, and so on, more specifically, correctness of various information such as a data format, a calling mode, a request result, and so on of the network request may be detected, and when an error is detected, a grammar error or a logic error of the application program may be corrected. The preset debug parameters may be preset in this embodiment, for example, the debug scope is defined by the preset debug parameters, 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, etc. The specific debugging process may adopt a debugging method in the prior art, which is not described herein.
S103, after the debugging operation is completed, releasing the network request.
In this embodiment, after the debugging is completed, 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; 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 debug parameters, and other network requests are directly released, and the debugged network requests are released after the debug operation is completed; in addition, the embodiment may also intercept the network request sent by the application program and/or the received partial network request directly according to the preset debug parameter, for example, only intercept the HTTP request or the HTTPs request, where the network request is released after the debug operation is completed, and does not intercept other network requests.
According to the network request debugging method provided by the embodiment, the network request sent by the application program and/or the network request received by the application program is intercepted in the application program; according to preset debugging parameters, carrying out debugging operation on the network request; and after the debugging operation is completed, releasing the network request. In the embodiment, the network request is intercepted in the application program during debugging, so that the debugging equipment for debugging is not required to be additionally configured, the debugged terminal is not required to be connected to the debugging equipment through a local area network, and the network request sent by the application program on the debugged terminal and/or the received network request are acquired by the debugging equipment, so that the operation steps of the debugging process are simplified, the local area network is not required to be built, complex setting is not required, and the dependence on network environment safety during the network request acquisition in the debugging process can be avoided; meanwhile, as the network request sent and/or received by the application program in any network environment can be obtained, the debugging process is not limited to a single network environment 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, the related certificate of the debugging tool does not need to be installed on the debugged terminal, so that the trust problem in the debugging process is solved.
On the basis of the foregoing embodiment, intercepting, inside an application, a network request sent by the application and/or a network request received by the application in S101 may include:
and intercepting the network request sent by the application program and/or the network request received by the application program through a network request interceptor in a debugging engine which is built in the application program in advance.
In this embodiment, a debug engine needs to be created in advance inside the application program before performing the debugging, where the debug engine has a network request interceptor, and when the debugging is performed, the network request interceptor can be used to intercept the network request sent by the application program and/or the network request received by the application program inside the application program.
Further, the intercepting, in S101, the network request sent by the application and/or the network request received by the application, 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 debug parameter, 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 HTTP request and/or HTTPs request) in the application program, etc., while other network requests may be directly released without interception or interception.
On the basis of any one of the foregoing embodiments, before intercepting, inside an application, a network request sent by the application and/or a network request received by the application in S101, the method further includes:
the debug engine is created inside the application.
In this embodiment, since it is necessary to intercept a network request issued by an application and/or a network request received by the application inside the application at the time of debugging, it is necessary to create a debug engine inside the application in advance before performing the debugging, the debug engine having a network request interceptor. Alternatively, the debug engine may be developed in advance and packaged into an SDK (Software Development Kit ); when the network request of a certain application program needs to be debugged, the application program is connected 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 comprises:
for an iOS operating system, creating an instance of the debug engine inside the application program, and creating a global network proxy instance in the instance of the debug engine, wherein the global network proxy instance is used as the network request interceptor in the debug engine.
In this embodiment, the global network agent instance is used as a network request interceptor in the debug engine, and during the debug process, the global network agent 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 to enable custom requests and responses, provide custom global cache support, redirect network requests, provide HTTP Mocking, and some other global network request modification requirements. In this embodiment, nsurlpropcol may be used to create a global proxy for network requests within an application, and specifically, network requests issued and/or received by the application may be intercepted by inheritance subclassing. In addition, network requests that need to be intercepted may be defined for NSURLProtocol instances, such as intercepting a network request of a certain interface in an application, or intercepting a network request of a certain type (e.g., HTTP request and/or HTTPs request) in an application, and so forth.
Further, when the debug engine is started, preset debug parameters are obtained first, and the global network proxy instance is initialized. The initialized global network proxy instance can intercept the network request sent and/or received by the application program in the debugging process, the debugging engine carries out the debugging operation on the intercepted network request according to the preset debugging parameters, and the network request is released after the completion of the debugging operation.
In another alternative embodiment, for an 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 inside the application program, and adding a network request tool class instance into the instance of the debugging engine;
and creating an instance of the 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 network request tool class instance, thereby completing the creation of the network request interceptor.
In this embodiment, adding the instance of the network request tool class to the instance of the debug engine may realize that the debug engine has the function of receiving and sending the network request, and after adding the instance of the network request interceptor to the interception attribute list of the network request tool class instance, the instance of the network request interceptor may intercept the network request sent and/or received by the application program by running the instance of the network request interceptor, and further, the debug engine performs the debug operation on the intercepted network request according to the preset debug parameters, and after completing the debug operation, the network request tool class instance releases the network request, that is, continues to send the network request sent by the application program, where the network request received by the application program is transferred 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 the 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 can be dynamically obtained through a reflection mechanism of Java language, and then the pre-created instance of the network request interceptor is dynamically added into the interception attribute list of the network request tool class instance through the reflection mechanism. The reflection mechanism is a Java language characteristic, is a function of a method capable of dynamically acquiring information and dynamically calling objects, can be used for dynamically acquiring an interception attribute list and dynamically adding an instance of a network request interceptor, can be used for dynamically adding the instance of the network request interceptor at any stage in a debugging process, does not need to pause the debugging process, does not need to carry out complex setting and coding of an interception program, and simplifies operation steps of the debugging process.
According to the network request debugging method provided by the embodiment, the network request sent by the application program and/or the network request received by the application program is intercepted in the application program; according to preset debugging parameters, carrying out debugging operation on the network request; and after the debugging operation is completed, releasing the network request. In the embodiment, the network request is intercepted in the application program during debugging, so that the debugging equipment for debugging is not required to be additionally configured, the debugged terminal is not required to be connected to the debugging equipment through a local area network, and the network request sent by the application program on the debugged terminal and/or the received network request are acquired by the debugging equipment, so that the operation steps of the debugging process are simplified, the local area network is not required to be built, complex setting is not required, and the dependence on network environment safety during the network request acquisition in the debugging process can be avoided; meanwhile, as the network request sent and/or received by the application program in any network environment can be obtained, the debugging process is not limited to a single network environment 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, the related certificate of the debugging tool does not need to be installed on the debugged terminal, so that the trust problem in the debugging process is solved.
Fig. 2 is a block diagram of a network request debugging device according to an embodiment of the present invention. The network request debugging device 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 device 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 configured to perform a debugging operation on the network request according to preset debugging parameters;
the interception module 21 is further configured to release the network request after completing the debug operation.
Further, the interception module 21 is configured to:
and intercepting the network request sent by the application program and/or the network request received by the application program through a network request interceptor in a debugging engine which is built in the application program in advance.
Further, the interception 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 includes a creation module configured to:
the debugging engine is created inside the application before the network request sent by the application and/or the network request received by the application is intercepted inside the application.
Optionally, the creating module is configured to:
for an iOS operating system, creating an instance of the debug engine inside the application program, and creating a global network proxy instance in the instance of the debug engine, wherein the global network proxy instance is used as the network request interceptor in the debug engine.
Further, the global network proxy instance is an NSURLProtocol instance.
Optionally, the creating module is configured to:
for an Android operating system, creating an instance of a debugging engine inside the application program, and adding a network request tool class instance into the instance of the debugging engine;
and creating an instance of the 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 network request tool class instance, thereby completing 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 device provided in the embodiment of the present invention may be specifically used to execute the method embodiment provided in fig. 1, and specific functions are not described herein.
According to the network request debugging device provided by the embodiment of the invention, the network request sent by the application program and/or the network request received by the application program is intercepted in the application program; according to preset debugging parameters, carrying out debugging operation on the network request; and after the debugging operation is completed, releasing the network request. In the embodiment, the network request is intercepted in the application program during debugging, so that the debugging equipment for debugging is not required to be additionally configured, the debugged terminal is not required to be connected to the debugging equipment through a local area network, and the network request sent by the application program on the debugged terminal and/or the received network request are acquired by the debugging equipment, so that the operation steps of the debugging process are simplified, the local area network is not required to be built, complex setting is not required, and the dependence on network environment safety during the network request acquisition in the debugging process can be avoided; meanwhile, as the network request sent and/or received by the application program in any network environment can be obtained, the debugging process is not limited to a single network environment 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, the related certificate of the debugging tool does not need to be installed on the debugged terminal, so that 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.
Specifically, the processor 32 is configured to execute 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 in the application program;
according to preset debugging parameters, carrying out debugging operation on the network request;
and after the debugging operation is completed, releasing the network request.
The network request debug apparatus of the embodiment shown in fig. 3 may be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effects are similar, and will not be described herein again.
In addition, the present embodiment also provides a computer-readable storage medium having stored thereon a computer program that is executed by a processor to implement the network request debugging method described in the above embodiments.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus application functions.
The integrated units implemented in the form of application functional units described above may be stored in a computer readable storage medium. The application functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: 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.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above. The specific working process of the above-described device may refer 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 for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (10)

1. A network request debugging method, comprising:
intercepting a network request sent by an application program and a network request received by the application program through a network request interceptor in a debugging engine which is built in the application program in advance;
according to preset debugging parameters, carrying out debugging operation on the network request;
releasing the network request after the debugging operation is completed;
before intercepting the network request sent by the application program and the network request received by the application program, the method further comprises the following steps:
creating the debug engine within the application;
the creating the debug engine inside the application program includes:
for an iOS operating system, creating an instance of the debug engine inside the application program, and creating a global network proxy instance in the instance of the debug engine, wherein the global network proxy instance is used as the network request interceptor in the debug engine.
2. The method of claim 1, wherein intercepting the network request issued by the application and the network request received by the application comprises:
and intercepting a network request sent by the application program and the network request received by the application program in the application program according to the preset debugging parameters.
3. The method of claim 1 or 2, wherein creating the debug engine inside the application comprises:
for an Android operating system, creating an instance of a debugging engine inside the application program, and adding a network request tool class instance into the instance of the debugging engine;
and creating an instance of the 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 network request tool class instance, thereby completing the creation of the network request interceptor.
4. The method of claim 3, wherein the 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.
5. A network request debugging device, comprising:
the interception module is used for intercepting a network request sent by the application program and the network request received by the application program through a network request interceptor in a debugging engine which is built in the application program in advance;
the debugging module is used for carrying out debugging operation on the network request according to preset debugging parameters;
the interception module is also used for releasing the network request after the debugging operation is completed;
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 the network request received by the application program;
the creation module is used for: for an iOS operating system, creating an instance of the debug engine inside the application program, and creating a global network proxy instance in the instance of the debug engine, wherein the global network proxy instance is used as the network request interceptor in the debug engine.
6. The apparatus of claim 5, wherein the interception module is to:
and intercepting a network request sent by the application program and the network request received by the application program in the application program according to the preset debugging parameters.
7. The apparatus of claim 5 or 6, wherein the creation module is configured to:
for an Android operating system, creating an instance of a debugging engine inside the application program, and adding a network request tool class instance into the instance of the debugging engine;
and creating an instance of the 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 network request tool class instance, thereby completing the creation of the network request interceptor.
8. The apparatus of claim 7, wherein the creation module is 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.
9. A network request-commissioning 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 of claims 1-4.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon;
the computer program implementing the method according to any of claims 1-4 when executed by a processor.
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 CN112134910A (en) 2020-12-25
CN112134910B true 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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* 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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN112134910A (en) 2020-12-25

Similar Documents

Publication Publication Date Title
US20210297410A1 (en) Mec platform deployment method and apparatus
US9244817B2 (en) Remote debugging in a cloud computing environment
JP7389791B2 (en) Implementing Compliance Settings with Mobile Devices to Adhere to Configuration Scenarios
US9858105B1 (en) Service for managing custom virtual machine images
US8782795B1 (en) Secure tenant assessment of information technology infrastructure
WO2017041562A1 (en) Method and device for identifying user identity of terminal device
KR20200023485A (en) Transmission of Control Data in Proxy-Based Network Communications
WO2017062101A1 (en) System and method for trusted operability when moving between network functions virtualization states
US20200344112A1 (en) On-premise and off-premise debugging
WO2020063607A1 (en) Application client launch method, service server, and client device
CN114189553B (en) Flow playback method, system and computing device
CN112699034B (en) Virtual login user construction method, device, equipment and storage medium
CN104570967B (en) Long-range control method and system based on android system
CN112134910B (en) Network request debugging method, device, equipment and storage medium
US11778451B2 (en) 5G Network Exposure Function (NEF) capturing processor identity
US9916280B2 (en) Virtualizing TCP/IP services with shared memory transport
CN110568996A (en) Local storage capacity expansion system based on device driver
CN111953718A (en) Page debugging method and device
US20220327044A1 (en) Generating a software application
US20220329663A1 (en) Managing a software application
US9668082B2 (en) Virtual machine based on a mobile device
CN113961194A (en) Engineering construction method, system, terminal and medium based on FLUTTER cross-application
US9609080B2 (en) Systems and methods for device identity delegation for application software
US10534626B2 (en) Methods for facilitating self-service automation utilities and devices thereof
CN115037572B (en) Application request identification method and device

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