socketio / socket.io-website

Socket.IO website and blog
https://socket.io
318 stars 668 forks source link

Update 07-api-overview.md #433

Closed sudarshanmg closed 7 months ago

sudarshanmg commented 7 months ago

The returned response is an array and not an object.

image

The index.html file: image

Quick fix: console.log(response[0].status)

Which gives the expected output: image

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
socket-io-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2024 5:14pm
darrachequesne commented 7 months ago

Hi! I don't think this is right:

socket.timeout(500).emit("new_msg", (err, response) => {
  // single response
});

io.timeout(500).emit("new_msg", (err, responses) => {
  // multiple responses
});

Could you please check?

sudarshanmg commented 7 months ago

My bad, you're right. Sorry!

darrachequesne commented 7 months ago

No problem, have a great day!