Я использую signalr 1.0.0-rc1-update1 из npm в моем приложении Angular.
Вот как я сейчас подключаюсь к концентратору:
this.hub = new signalR.HubConnectionBuilder()
.withUrl(`${environment.apiUrl}operations?token=${this.user.token}`)
.configureLogging(signalR.LogLevel.Trace)
.build();
this.hub.on('GetOperations', (data: OperationGetDto[]) => {
this.data = data;
});
this.hub.start()
.then(() => {
this.hub.invoke('GetOperations');
})
.catch((e) => {
this.notificationService.openSnackBar('Error while establishing connection');
});
Как мне указатьтип транспорта, например, длинный опрос?