httpdbg is a simple Python tool designed to debug HTTP(S) client and server requests. It functions as a local proxy, capturing and displaying all outgoing and incoming HTTP traffic in a user-friendly web interface. Currently at version 2.1.6, it receives regular updates for bug fixes and minor feature enhancements, maintaining active development.
pip install httpdbgVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to programmatically start and stop the httpdbg proxy, and then make a simple HTTP request using the `requests` library, ensuring it routes through the proxy for debugging. The environment variables are set to help other libraries (like `httpx`) automatically pick up the proxy.
Review existing HTTP client configurations and test suites, especially those interacting with HTTP/2 endpoints, for unexpected behavior. Consult httpdbg documentation for any new configuration options related to HTTP/2.
Ensure your HTTP client (e.g., `requests`, `httpx`, `urllib`) is explicitly configured to use the `httpdbg` proxy. This often involves setting `HTTP_PROXY` and `HTTPS_PROXY` environment variables to `http://127.0.0.1:5000` (or your chosen port), or passing a `proxies` dictionary to the client functions/sessions.
If you encounter an 'Address already in use' error, start `httpdbg` on an alternative port, e.g., `httpdbg.start(port=8000)`. You will then need to configure your client to use this new port for the proxy.
No dependency data recorded yet.