Skip to main content

A very simple tool to debug HTTP(S) client requests

Project description

httpdbg

A very simple tool to debug HTTP(S) client requests

installation

pip install httpdbg

usage

interactive console

Open an interactive console using the following command: pyhttpdbg

(venv) dev@host:~/dir$ pyhttpdbg 
.... - - .--. -.. -... --. .... - - .--. -.. -... --. .... - - .--. -.. -... --.
  httpdbg - HTTP(S) requests available at http://localhost:4909/
.... - - .--. -.. -... --. .... - - .--. -.. -... --. .... - - .--. -.. -... --.
Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> 

Perform HTTP requests.

You can inspect the HTTP requests directly in your web browser at http://localhost:4909.

note: we only intercept the requests done using requests.

script

You can trace all the HTTP requests performed by a script

pyhttpdbg --script filename.py [arg1 --arg2 ...]

pytest

You can trace all the HTTP requests performed during your tests

pyhttpdbg --pytest [arg1 --arg2 ...]

note: httpdbg can't record the HTTP(S) requests if tests are executed in parallel using plugin like xdist.

configuration

httpdbg doesn't need any configuration to work but some few settings are available for particular use.

command line

usage: pyhttpdbg [-h] [--port PORT] [--version] [--keep-up | --force-quit]
                 [--console | --pytest | --script]

httdbg - a very simple tool to debug HTTP(S) client requests

options:
  -h, --help            show this help message and exit
  
  --port PORT, -p PORT  the web interface port
  
  --version, -v         print the httpdbg version

  --keep-up, -k         keep the server up even if the requests have been read
  --force-quit, -q      stop the server even if the requests have not been read

  --console             run a python console
  --pytest              run pytest (the next args are passed to pytest as is)
  --script              run the script that follows this arg (the next args are passed to the script as is)
                        

web interace

Clic on the button on the top right of the page.

Many options are available:

  • Hide the status column
  • Hide the method column
  • Hide the netloc in the url
  • Hide the initiator column

To keep your configuration, bookmark the page with the full search query.

Fox example, if you want to keep only the status and url columns, the url will be:

http://localhost:4909/?hm=on&hi=on

web interface

All the requests recorded are available on the web interface.

The requests:

  • are still available in the web page even if the python process stopped (except if you force quit before the requests have been loaded by the web page).
  • are automatically clean if a new execution of httpdbg is detected.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

httpdbg-0.0.48.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

httpdbg-0.0.48-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file httpdbg-0.0.48.tar.gz.

File metadata

  • Download URL: httpdbg-0.0.48.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for httpdbg-0.0.48.tar.gz
Algorithm Hash digest
SHA256 63ed20150102a30a52456736c665033f2a563f251db2dedd95ef042d6201aa12
MD5 029d0ebb9a323f1e041785ff0139eadb
BLAKE2b-256 45a16ad90fb30a53796c10e7812c6eee4ca77d02b79ab01bed3ffbafc6418be0

See more details on using hashes here.

File details

Details for the file httpdbg-0.0.48-py3-none-any.whl.

File metadata

  • Download URL: httpdbg-0.0.48-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for httpdbg-0.0.48-py3-none-any.whl
Algorithm Hash digest
SHA256 d169099f39d4f7f1f41490146576bb2627d88156dfd508bc6dee25e3f211557b
MD5 138a1095cc0c9863b36efa5f6b48f52f
BLAKE2b-256 1a809339710892c12f718f673b337552282e369db54fa4eefd9af5f4326df3a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page