Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AliEasy opened this issue Aug 31, 2020 · 0 comments

Comments

@AliEasy
Copy link

AliEasy commented Aug 31, 2020

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){
  ......
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant