diff --git a/pyproject.toml b/pyproject.toml index 9047279..437e5bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ [project] name = "minibone" -version = "0.7.3" +version = "0.7.4" description = "Small boiler plate with tools for multithreading." keywords = ["multithreading", "task", "job", "background"] authors = [ diff --git a/src/minibone/httpt.py b/src/minibone/httpt.py index 5517672..d4e45a5 100644 --- a/src/minibone/httpt.py +++ b/src/minibone/httpt.py @@ -161,6 +161,9 @@ def _get(self, url: str, params: dict = None) -> str: assert not params or isinstance(params, dict) self._logger.debug("_get %s", url) + if not params: + params= dict() + resp = None try: r = self.fetcher.get(url, timeout=self._timeout, verify=False, **params) @@ -187,6 +190,9 @@ def _post(self, url: str, payload: dict = None, is_json: bool = True) -> dict | assert isinstance(is_json, bool) self._logger.debug("_post %s %s is_json %s", url, payload, is_json) + if not payload: + payload = dict() + resp = None try: r = self.fetcher.post(url, data=payload, timeout=self._timeout, verify=False)