Skip to content

Invalid argument(s): Response Content-Type not supported: [application/json; charset=UTF-8] #41

@AliEasy

Description

@AliEasy

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){
  ......
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions