jamiewest / signalr_core

ASP.NET Core SignalR Dart Client
https://pub.dev/packages/signalr_core
MIT License
90 stars 63 forks source link

The plugin is not accepting https connections #8

Closed Katekko closed 4 years ago

Katekko commented 4 years ago

I need a way to set certificate false when I are in localhost. Otherwise thats the error that I get :(

image

jamiewest commented 4 years ago

Set the client in HttpConnectionOptions like so:

HttpConnectionOptions(
   client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true)
)

This will force the client to accept whatever cert is being used. If you need to use a specific cert, you can set the SecurityContext within the HttpClient.