Skip to content

Commit dc0bca7

Browse files
committed
add logging on all HTTP requests using log_calls decorator
1 parent f1724c0 commit dc0bca7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

todoist_api_python/_core/http_requests.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from requests.status_codes import codes
77

88
from todoist_api_python._core.http_headers import create_headers
9+
from todoist_api_python._core.utils import log_calls
910

1011
if TYPE_CHECKING:
1112
from requests import Session
@@ -22,7 +23,7 @@
2223

2324
T = TypeVar("T")
2425

25-
26+
@log_calls
2627
def get(
2728
session: Session,
2829
url: str,
@@ -45,7 +46,7 @@ def get(
4546
response.raise_for_status()
4647
return cast("T", response.ok)
4748

48-
49+
@log_calls
4950
def post(
5051
session: Session,
5152
url: str,
@@ -73,7 +74,7 @@ def post(
7374
response.raise_for_status()
7475
return cast("T", response.ok)
7576

76-
77+
@log_calls
7778
def delete(
7879
session: Session,
7980
url: str,

0 commit comments

Comments
 (0)