A simple HTTP inspector to debug webhooks and other incoming requests
Project description
A dummy/mocking server to inspect incoming HTTP connections. Use it to test/debug Webhooks. Provides nice console logging + a dump of every request as a file.
$ docker run -it -p 5555:5555 -v $(pwd)/logs:/app santiagobasulto/hyper
Explanation:
-p P1:5555
,P1
is the local port in your host.-v YOUR_PATH:/app
,YOUR_PATH
is a volume in your file system to store the logs of the requests.
Logs names have the convention METHOD.PATH.TIMESTAMP.request.json
and METHOD.PATH.TIMESTAMP.body.EXTENSION
(if a body is sent). For example, POST.some.path.1617889344.request.json
and POST.some.path.1617889344.body.json
If you don't want to store the logs, don't pass a -v
option.
Installation
Using pip
:
$ pip install hyper-inspector
Using pipx
:
$ pipx install hyper-inspector
Usage
$ hyper --help
usage: http_inspector [-h] [-r RESPONSE] [-f [ENABLE_FILE_LOGGING]] [-d LOGGING_DIRECTORY] [--log-body [LOG_BODY]] [--ip IP] [--port PORT]
Inspect and debug HTTP requests
optional arguments:
-h, --help
Show this help message and exit
-r, --response [default 200]
Default response for every incoming request
-f, --enable-file-logging [default True]
Enable file logging
-d, --logging-directory [default .]
Directory path to store logs
--log-body [default True]
Should it log the whole body to the console.
--ip [default '']
IP Addr to serve
--port [default 555]
Server Port to listen to
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hyper-inspector-0.0.5.tar.gz
(6.9 kB
view hashes)
Built Distribution
Close
Hashes for hyper_inspector-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dda0ee62ce438c83a398855220db38bb08f080744ae50db06f44c276e6d84586 |
|
MD5 | f3a1d462b768f189d7706ee236cbfebe |
|
BLAKE2b-256 | 787c8710546c5d12bc3883588ed9d128f5147427a65fe7cb5d260fbe56eaf618 |