httpSend
inline suspend fun <T> RealtimeChannel.httpSend(event: String, payload: T, noinline 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.
Parameters
event
The name of the broadcast event
payload
Payload to be sent (required), encoded via Realtime.serializer
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