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