Created
August 7, 2022 11:39
-
-
Save bylatt/8a9a90ca084bdc7cbefc17b3b0a4621b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dio initDioClient() { | |
final dio = Dio(); | |
(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) { | |
client.badCertificateCallback = (X509Certificate cert, String host, int port) => true; | |
}; | |
return dio; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment