Repository navigation
feat(realtime): update httpSend to per-event broadcast URL with binary support - #1467
Merged
Merged
Conversation
…y support
Replace the old POST /api/broadcast endpoint (with a messages array
wrapper) with the per-event URL /api/broadcast/{topic}/events/{event},
adding ?private=true for private channels and URL-encoding the topic and
event names.
The payload is now sent directly instead of wrapped. TypedData and
ByteBuffer payloads are sent as application/octet-stream; all other
payloads are JSON-encoded. The payload parameter type widens from
Map<String, dynamic> to Object, which is backward compatible for callers.
Requires Realtime server v2.97.0 or newer.
spydon
force-pushed
the
lukasklingsbo/sdk-1018-httpsend-per-event-url
branch
from
June 25, 2026 09:39
87119d8 to
f451d04
Compare
Vinzent03
reviewed
Jun 25, 2026
Vinzent03
approved these changes
Jun 26, 2026
grdsdev
approved these changes
Jun 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Brings
RealtimeChannel.httpSend()to parity with supabase-js (supabase/supabase-js#2400).POST /api/broadcast/{topic}/events/{event}instead of the oldPOST /api/broadcastwith amessagesarray wrapper.?private=truequery parameter for private channels.messageswrapper).TypedData(e.g.Uint8List) andByteBufferpayloads are sent asapplication/octet-stream; everything else is JSON-encoded.The implicit REST fallback in
send()is intentionally left on the old format, matching supabase-js, which only changedhttpSend().Compatibility
payloadparameter type widens fromMap<String, dynamic>toObjectto allow binary payloads. This is backward compatible: existing calls passing a map still compile.feat.Test plan
httpSendtests for the new URL format and direct payload body.privatequery parameter (present for private, absent for public), URL-encoding of special characters, andUint8List/ByteBufferbinary payloads.Closes SDK-1018