Skip to content

Http

aiohttp-based HTTP client for the Syncopate REST API.

class HTTPClient()

HTTP client for the Syncopate REST API.

Handles Bot token authentication, JSON serialization, and error mapping to :class:HTTPError.

async def close() -> None

Close the underlying HTTP session.

async def get(path: str,
*,
params: dict[str, str] | None = None) -> dict[str, Any]

Make a GET request.

async def post(path: str,
*,
json: dict[str, object] | None = None,
extra_headers: dict[str, str] | None = None) -> dict[str, Any]

Make a POST request.

async def patch(path: str,
*,
json: dict[str, object] | None = None) -> dict[str, Any]

Make a PATCH request.

async def delete(path: str) -> None

Make a DELETE request.