Tuesday I blogged about some breaking changes when updating the SignalR backend in ASP.NET Core. Later on I noticed I had to do some changes on the frontend as well:
From:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.connection = new HubConnection(url, { | |
transport: TransportType.WebSockets | |
}); |
To:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.connection = new HubConnectionBuilder() | |
.withUrl(url,HttpTransportType.WebSockets) | |
.build(); |