You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-10
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,13 @@
1
1
# httpdbg
2
2
3
-
A very simple tool to debug HTTP(S) client requests.
3
+
`httpdbg` is a tool for Python developers to easily debug the HTTP(S) client requests in a Python program.
4
+
5
+
To use it, execute your program using the `pyhttpdbg` command instead of `python` and that's it. Open a browser to `http://localhost:4909` to view the requests:
4
6
5
7

6
8
9
+
Full documentation => [https://httpdbg-docs.readthedocs.io/](https://httpdbg-docs.readthedocs.io/en/latest/)
10
+
7
11
## installation
8
12
9
13
```
@@ -14,9 +18,9 @@ pip install httpdbg
14
18
15
19
### interactive console
16
20
17
-
Open an interactive console using the following command:`pyhttpdbg`
21
+
Open an interactive console using the command `pyhttpdbg`.
httpdbg - HTTP(S) requests available at http://localhost:4909/
@@ -35,21 +39,21 @@ You can inspect the HTTP requests directly in your web browser at http://localho
35
39
36
40
You can trace all the HTTP requests performed by a script
37
41
38
-
```sh
42
+
```console
39
43
pyhttpdbg --script filename.py [arg1 --arg2 ...]
40
44
```
41
45
42
46
### pytest
43
47
44
48
You can trace all the HTTP requests performed during your tests
45
49
46
-
```sh
50
+
```console
47
51
pyhttpdbg -m pytest [arg1 --arg2 ...]
48
52
```
49
53
50
54
If you use the `pytest-xdist` plugin to execute your tests in parallel, then you must install the `pytest-httpdbg` plugin if you want to trace the requests done by the pytest workers.
51
55
52
-
```
56
+
```console
53
57
pip install httpdbg[pytest]
54
58
```
55
59
@@ -59,8 +63,8 @@ You can trace all the HTTP requests performed by a library module run as a scrip
59
63
60
64
For example, you can view which HTTP requests are performed by `pip` when you install a package.
61
65
62
-
```sh
63
-
pyhttpdbg -m pip install httpdbg --upgrade
66
+
```console
67
+
pyhttpdbg -m pip install hookdns --upgrade
64
68
```
65
69
66
70
## Initiators
@@ -69,7 +73,7 @@ An initiator is the function/method that is at the origin of the HTTP requests.
69
73
70
74
To add a new package in the list of initiators, you can use the `-i` command line argument:
71
75
72
-
```sh
76
+
```console
73
77
pyhttpdbg -i api_client_pck --script my_script.py
74
78
```
75
79
@@ -92,7 +96,7 @@ No configuration is necessary to start but some few settings are available for p
0 commit comments