Skip to content

Commit

Permalink
Fix bug in HTTPt class
Browse files Browse the repository at this point in the history
  • Loading branch information
erick committed Jan 21, 2025
1 parent 5f20af7 commit 8255672
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
6 changes: 6 additions & 0 deletions src/minibone/httpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 8255672

Please sign in to comment.