diff --git a/httpdbg/__init__.py b/httpdbg/__init__.py index 1197b8a..ecd81b7 100644 --- a/httpdbg/__init__.py +++ b/httpdbg/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.1.3" +__version__ = "2.1.4" __all__ = ["export_html", "httprecord", "HTTPRecords"] diff --git a/httpdbg/__main__.py b/httpdbg/__main__.py index 25a1d5d..b8ed309 100644 --- a/httpdbg/__main__.py +++ b/httpdbg/__main__.py @@ -28,11 +28,6 @@ def pyhttpdbg( set_env_for_logging(params.log_level, params.log) - url = f"http://{params.host}:{params.port}/{'?hi=on' if params.console else ''}" - - if not params.no_banner: - print_msg(f" httpdbg - HTTP(S) requests available at {url}") - sys.path.insert(0, "") # to mimic the default python command behavior def run_recorder( @@ -58,6 +53,11 @@ def run_recorder( export_html(records, Path(params.export_html)) else: + url = f"http://{params.host}:{params.port}/{'?hi=on' if params.console else ''}" + + if not params.no_banner: + print_msg(f" httpdbg - HTTP(S) requests available at {url}") + with httpdbg_srv(params.host, params.port) as records: run_recorder(records, params.initiator, not params.only_client, test_mode)