mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 17:11:14 +00:00
fix(linter): Change httpClientAdapter callback creation
This commit is contained in:
parent
9ea952b46e
commit
371d83b4be
|
@ -15,10 +15,15 @@ abstract class RestApiMap {
|
|||
dio.interceptors.add(PrettyDioLogger());
|
||||
}
|
||||
dio.interceptors.add(ConsoleInterceptor());
|
||||
final adapter = dio.httpClientAdapter as IOHttpClientAdapter;
|
||||
final client = adapter.createHttpClient!();
|
||||
client.badCertificateCallback =
|
||||
(final X509Certificate cert, final String host, final int port) => true;
|
||||
dio.httpClientAdapter = IOHttpClientAdapter(
|
||||
createHttpClient: () {
|
||||
final client = HttpClient();
|
||||
client.badCertificateCallback =
|
||||
(final X509Certificate cert, final String host, final int port) =>
|
||||
true;
|
||||
return client;
|
||||
},
|
||||
);
|
||||
|
||||
dio.interceptors.add(
|
||||
InterceptorsWrapper(
|
||||
|
|
Loading…
Reference in a new issue