I was wondering if any you can point me to a web flutter library that had http badCertificateCallback. I tried DIO but it is giving me an error and submit an issue but I haven't heard from them yet
DIO code:
Dio dio = new Dio(options);
(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate =
(client) {
client.badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
};
Error: Expected a value of type 'DefaultHttpClientAdapter', but got one of type 'BrowserHttpClientAdapter'
I also tried http, but it doesn't have a bad Certificate Callback, we could use this but it isn't web-compatible
HttpClient httpClient = new HttpClient();
httpClient.badCertificateCallback =
((X509Certificate cert, String host, int port) => true);
IOClient ioClient = new IOClient(httpClient);
response = await ioClient.post(url, body: data, headers: headers);
Any comment will be more that apreciate.
Thanks in advance, Daniel