The HTTP method for the route.
Optional
modifiesAuthentication: booleanIndicates if the route modifies authentication. If true all Websocket Outbounds with tag will be re-sent automatically.
Preparations for a simple standalone message route:
This method can be called by sending a message using method example.insert
.
The response (return value of the method, ex: insertId) is sent to the client using m.example.insert
.
class Example {
@StandaloneRoute("example.insert")
async insert(data: any, connection: WebsocketConnection): Promise<any> {
// process data
return insertId;
}
}
Generated using TypeDoc
StandaloneRoute decorator for WebSocket routes. Can be used to register Standalone WebSocket routes. This annotation can be used for methods only.
Supported Decorators:
@Auth
@Modifies
and@ModifiesFor
@ModifiesAuthentication