• Header decorator.

    @WebSocketRoute.Header() is a parameter decorator function for the WebSocket header with type casting and assertion.

    For reference, @WebSocketRoute.Header() is different with HTTP headers. It's for WebSocket protocol, especially for TGrid's WebSocketConnector and WebSocketAcceptor's special header.

    Also, this @WebSocketRoute.Header() decorator is optional, and can be substituted by @WebSocketRoute.Acceptor() decorated parameter by accessting to the WebSocketAcceptor.header property.

    Type Parameters

    • T

    Parameters

    • Optionalvalidator: IRequestBodyValidator<T>

    Returns ParameterDecorator