Skip to content

Commit

Permalink
add data argument to EditorAPIContext.request
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent2916 committed Jan 31, 2025
1 parent 5b913df commit 2a552ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion finegrain/src/finegrain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import httpx
import httpx_sse
from httpx._types import QueryParamTypes, RequestFiles
from httpx._types import QueryParamTypes, RequestFiles, RequestData

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -296,6 +296,7 @@ async def request(
method: Literal["GET", "POST"],
url: str,
files: RequestFiles | None = None,
data: RequestData | None = None,
params: QueryParamTypes | None = None,
json: dict[str, Any] | None = None,
headers: Mapping[str, str] | None = None,
Expand All @@ -307,6 +308,7 @@ async def _q() -> httpx.Response:
f"{self.base_url}/{url}",
headers=dict(headers or {}) | self.auth_headers,
files=files,
data=data,
params=params,
json=json,
)
Expand Down

0 comments on commit 2a552ff

Please sign in to comment.