@@ -3,7 +3,6 @@ import 'dart:io';
3
3
4
4
import 'package:dantotsu/Functions/Function.dart' ;
5
5
import 'package:dantotsu/api/Sources/Model/settings.dart' ;
6
- import 'package:dantotsu/api/Sources/http/rhttp/src/model/settings.dart' ;
7
6
import 'package:flutter/cupertino.dart' ;
8
7
import 'package:flutter_inappwebview/flutter_inappwebview.dart'
9
8
as flutter_inappwebview;
@@ -12,42 +11,15 @@ import 'package:http_interceptor/http_interceptor.dart';
12
11
import '../../../logger.dart' ;
13
12
import '../../../main.dart' ;
14
13
import '../Eval/dart/model/m_source.dart' ;
15
- import '../http/rhttp/rhttp.dart' as rhttp;
16
14
17
15
class MClient {
18
16
MClient ();
19
-
20
- static Client httpClient (
21
- {Map <String , dynamic >? reqcopyWith, rhttp.ClientSettings ? settings}) {
22
- if (! (reqcopyWith? ["useDartHttpClient" ] ?? false )) {
23
- try {
24
- settings ?? = rhttp.ClientSettings (
25
- throwOnStatusCode: false ,
26
- proxySettings: reqcopyWith? ["noProxy" ] ?? false
27
- ? const rhttp.ProxySettings .noProxy ()
28
- : null ,
29
- timeout: reqcopyWith? ["timeout" ] != null
30
- ? Duration (seconds: reqcopyWith? ["timeout" ])
31
- : null ,
32
- timeoutSettings: TimeoutSettings (
33
- connectTimeout: reqcopyWith? ["connectTimeout" ] != null
34
- ? Duration (seconds: reqcopyWith? ["connectTimeout" ])
35
- : null ),
36
- tlsSettings: rhttp.TlsSettings (
37
- verifyCertificates:
38
- reqcopyWith? ["verifyCertificates" ] ?? false ));
39
- return rhttp.RhttpCompatibleClient .createSync (settings: settings);
40
- } catch (_) {}
41
- }
42
- return IOClient (HttpClient ());
43
- }
44
-
45
17
static InterceptedClient init (
46
18
{MSource ? source,
47
19
Map <String , dynamic >? reqcopyWith,
48
- rhttp. ClientSettings ? settings }) {
20
+ }) {
49
21
return InterceptedClient .build (
50
- client: httpClient (settings : settings, reqcopyWith : reqcopyWith ),
22
+ client: IOClient ( HttpClient () ),
51
23
interceptors: [MCookieManager (reqcopyWith), LoggerInterceptor ()]);
52
24
}
53
25
0 commit comments