httpSend
abstract suspend fun httpSend(event: String, payload: BroadcastPayload, builder: HttpSendBuilder.() -> Unit = {})(source)
Sends a broadcast message explicitly via REST API.
This method always uses the REST API endpoint regardless of WebSocket connection state. Useful when you want to guarantee REST delivery or when gradually migrating from implicit REST fallback.
Payloads that are a ByteArray are sent as application/octet-stream; all other payloads are JSON-encoded.
Parameters
event
The name of the broadcast event
payload
Payload to be sent (required)
builder
Options including timeout
Throws
RestException
If any error appears after sending the payload
If the realtime version does not support sending broadcasts via HTTP