mirror of
https://github.com/foss42/apidash.git
synced 2025-08-06 13:51:20 +08:00
final commit
This commit is contained in:
@ -5,7 +5,8 @@ import 'package:http/io_client.dart';
|
|||||||
|
|
||||||
http.Client createHttpClientWithNoSSL() {
|
http.Client createHttpClientWithNoSSL() {
|
||||||
var ioClient = HttpClient()
|
var ioClient = HttpClient()
|
||||||
..badCertificateCallback = (X509Certificate cert, String host, int port) => true;
|
..badCertificateCallback =
|
||||||
|
(X509Certificate cert, String host, int port) => true;
|
||||||
return IOClient(ioClient);
|
return IOClient(ioClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,8 +22,11 @@ class HttpClientManager {
|
|||||||
|
|
||||||
HttpClientManager._internal();
|
HttpClientManager._internal();
|
||||||
|
|
||||||
http.Client createClient(String requestId, {bool noSSL = false}) {
|
http.Client createClient(
|
||||||
final client = (noSSL && !kIsWeb) ? createHttpClientWithNoSSL() : http.Client();
|
String requestId,
|
||||||
|
{bool noSSL = false}) {
|
||||||
|
final client =
|
||||||
|
(noSSL && !kIsWeb) ? createHttpClientWithNoSSL() : http.Client();
|
||||||
_clients[requestId] = client;
|
_clients[requestId] = client;
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user