Implement pre-processors for Socket.IO endpoints or Shared Socket.IO connections

I’m inspecting a Socket.IO server with Apidog, and this Socket.IO server requires that I first emit a ‘login’ event before doing anything else.

Each Socket.IO endpoint in Apidog maintains its own connection. Also, each Socket.IO endpoint in Apidog only permits me to prepare one single event (e.g. ‘info’). This means that I always have to copy and paste in a ‘login’ event and JSON body with credentials, and then change the event to the actual event I want to call. From a usability standpoint, this is bad, as I cannot save any pre-populated requests.

What I would prefer is that Socket.IO connections are separate from events and event listeners. I should be able to establish a Socket.IO connection, and then have separate events configured underneath that connection as discrete menu items. These event menu items would all share the same connection, meaning I could open the ‘login’ event after connecting and send that, and then click on another event and send that. I’d still be fine with each event having its own list of event listeners configured on it so you can see the output that occurs after you emit an event, though I think this list should be a readonly list that you can toggle the listeners on and off with when working on the event - you would still need to declare the event listeners on the connection with their default on/off value.

You can add multiple events to a single Socket.IO connection in Apidog. Please refer to this documentation for details: Socket.IO - Apidog Docs. Regarding your request to save and reuse sent messages, we’ve noted this as a feature request.

Thanks for your reply. Yes I should have been more clear - saving and reusing messages is what I’m looking for, just like having multiple HTTP requests saved. Thank you!

Thank you for your detailed feedback. We’ve recorded this feature request and will work on it progressively.