Skip to content

[BUG] -Error: the recorded event cannot be heard #215

@MarioCarlosChita

Description

@MarioCarlosChita

class ApiRoute extends Route {
@OverRide
String prefix = 'api/v1';

@OverRide
void register() {
super.register();

Router.websocket('/ws', (WebSocketEvent event) {
  print('websocket connenction done!');

  event.on('message', (WebSocketClient client, dynamic payload) {
    // Handle user-typing event for default route
    print('websocket connenction done event  message!');
    client.emit('message', {"data": 'success websocket connection'});
  });
});

}
}

the base url : ws://127.0.0.1:8000/api/v1/ws

sender data using postman:
{
"event":"message",
"payload":"data"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions