http_client#

cloudly.util.http_client.request(url, method, *, session: Client, payload=None, payload_type: str | None = None, **kwargs)[source]#

Note: this is a sync function. For repeated use, this may be used in threads in a streaming pipeline or in an async context.

async cloudly.util.http_client.a_request(url, method, *, session: AsyncClient, payload=None, payload_type: str | None = None, **kwargs)[source]#

Make an sync call to a REST API.

payload is a Python native type, usually dict.

The client session is managed by the caller.