Skip to content

Commit 7cf6ff8

Browse files
committed
Add more clarity
1 parent e063672 commit 7cf6ff8

File tree

1 file changed

+4
-2
lines changed
  • src/pages/[platform]/build-a-backend/data/connect-event-api

1 file changed

+4
-2
lines changed

src/pages/[platform]/build-a-backend/data/connect-event-api/index.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ export default function App() {
8282
}, []);
8383

8484
async function publishEvent() {
85+
// Publish via HTTP POST
8586
await events.post('default/channel', { some: 'data' });
8687

87-
// Alternative way to publish events through the channel
88+
// Alternatively, publish events through the WebSocket channel
8889
const channel = await events.connect('default/channel');
8990
await channel.publish({ some: 'data' });
9091
}
@@ -244,9 +245,10 @@ export default function App() {
244245
}, []);
245246

246247
async function publishEvent() {
248+
// Publish via HTTP POST
247249
await events.post('default/channel', { some: 'data' });
248250

249-
// Alternative way to publish events through the channel
251+
// Alternatively, publish events through the WebSocket channel
250252
const channel = await events.connect('default/channel');
251253
await channel.publish({ some: 'data' });
252254
}

0 commit comments

Comments
 (0)