Skip to content

Commit

Permalink
feat: replace bytes with BytesPayload for post/patch/put requests
Browse files Browse the repository at this point in the history
  • Loading branch information
danfimov committed Sep 18, 2023
1 parent 7bbca90 commit 86e554e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ya_tracker_client/infrastructure/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from ssl import create_default_context
from typing import Any

from aiohttp import ClientSession, ClientTimeout, TCPConnector
from aiohttp import BytesPayload, ClientSession, ClientTimeout, TCPConnector
from certifi import where

from ya_tracker_client.domain.client import BaseClient
Expand Down Expand Up @@ -51,7 +51,7 @@ async def _make_request(
method: str,
url: str,
params: dict[str, Any] | None = None,
data: bytes | None = None,
data: bytes | BytesPayload | None = None,
) -> tuple[int, bytes]:
session = self._get_session()
async with session.request(method, url, params=params, data=data) as response:
Expand Down

0 comments on commit 86e554e

Please sign in to comment.