| | |
| | | contentType: "application/x-www-form-urlencoded"); |
| | | dio.interceptors.add(CookieManager(cookieJar)); |
| | | //设置代理 |
| | | (dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = |
| | | (HttpClient client) { |
| | | client.findProxy = (uri) { |
| | | return 'PROXY 192.168.3.122:8888'; |
| | | }; |
| | | client.badCertificateCallback = |
| | | (X509Certificate cert, String host, int port) => true; |
| | | }; |
| | | // (dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = |
| | | // (HttpClient client) { |
| | | // client.findProxy = (uri) { |
| | | // return 'PROXY 192.168.3.122:8888'; |
| | | // }; |
| | | // client.badCertificateCallback = |
| | | // (X509Certificate cert, String host, int port) => true; |
| | | // }; |
| | | |
| | | // FormData formData = FormData.fromMap(params); |
| | | var response = await dio.post( |