https://github.com/cle-b/httpdbg Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development + View all Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up Reseting focus 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 {{ message }} cle-b / httpdbg Public * Notifications You must be signed in to change notification settings * Fork 0 * Star 112 A tool for Python developers to easily debug the HTTP(S) client requests in a Python program. httpdbg.readthedocs.io/ License Apache-2.0 license 112 stars 0 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 1 * Pull requests 1 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights cle-b/httpdbg This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Last commit Last Name Name message commit date Latest commit History 228 Commits .github/workflows .github/workflows httpdbg httpdbg tests tests .coveragerc .coveragerc .gitignore .gitignore CREDITS.md CREDITS.md LICENSE LICENSE Makefile Makefile README.md README.md pyproject.toml pyproject.toml pytest.ini pytest.ini requirements-dev-ui.txt requirements-dev-ui.txt requirements-dev.txt requirements-dev.txt setup.cfg setup.cfg tox.ini tox.ini ui.png ui.png View all files Repository files navigation * README * Apache-2.0 license httpdbg httpdbg is a tool for Python developers to easily debug the HTTP(S) client requests in a Python program. 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: [ui] Full documentation => https://httpdbg.readthedocs.io/ installation pip install httpdbg usage interactive console Open an interactive console using the 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. 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 -m pytest [arg1 --arg2 ...] 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. pip install httpdbg[pytest] module You can trace all the HTTP requests performed by a library module run as a script using the -m command line argument. For example, you can view which HTTP requests are performed by pip when you install a package. pyhttpdbg -m pip install hookdns --upgrade Initiators An initiator is the function/method that is at the origin of the HTTP requests. By default, we already support some packages but you can add your own initiators. To add a new package in the list of initiators, you can use the -i command line argument: pyhttpdbg -i api_client_pck --script my_script.py You can use any package as an initiator, this is not limited to HTTP requests. Already supported packages packages status requests supported urllib3 supported httpx supported aiohttp supported pytest supported your_package yes, with the arg -i your_package configuration No configuration is necessary to start but some few settings are available for particular use. command line usage: pyhttpdbg [-h] [--port PORT] [--version] [--initiator INITIATOR] [--keep-up | --force-quit] [--console | --module MODULE | --script 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 --initiator INITIATOR, -i INITIATOR add a new initiator (package) --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 (default) --module MODULE, -m MODULE run library module as a script (the next args are passed to pytest as is) --script SCRIPT run a script (the next args are passed to the script as is) web interace Clic on the [?] button on the top right of the page. Some options are available: * Hide the netloc in the url * Hide the initiator rows To keep your configuration, bookmark the page with the full search query. Fox example, if you want to hide the initiator rows by default, the url will be: http://localhost:4909/?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 cleaned if a new execution is detected. documentation https://httpdbg.readthedocs.io About A tool for Python developers to easily debug the HTTP(S) client requests in a Python program. httpdbg.readthedocs.io/ Topics python http tools rest rest-api aiohttp pytest requests debug python-requests urllib3 httpx httpdbg pyhttpdbg Resources Readme License Apache-2.0 license Activity Stars 112 stars Watchers 2 watching Forks 0 forks Report repository Releases 103 v0.22.0 Latest Sep 24, 2024 + 102 releases Languages * Python 74.2% * JavaScript 11.9% * HTML 10.3% * CSS 2.9% * Makefile 0.7% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.