Unhandled Exception: Invalid argument(s): Response Content-Type not supported: [application/json; charset=UTF-8]
Any idea how to solve it?
My code:
Future<void> openChatConnection() async {
if (_hubConnection == null) {
_hubConnection = HubConnectionBuilder().withUrl(_serverUrl).build();
_hubConnection.on("RecieveNotification", null);
}
if (_hubConnection.state != HubConnectionState.Connected) {
await _hubConnection.start();
}
}
Future<void> sendChatMessage(String chatMessage) async {
if( chatMessage == null ||chatMessage.length == 0){
return;
}
await openChatConnection();
_hubConnection.invoke("SendNotifications");
}
void _handleIncommingChatMessage(List<Object> args){
......
}