Skip to content
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (26 sloc) 947 Bytes
import 'dart:io';
import 'package:cookie_jar/cookie_jar.dart';
import 'package:dio/dio.dart';
main() async {
var dio = new Dio();
//dio.options.connectTimeout = 2000;
// More about HttpClient proxy topic please refer to Dart SDK doc.
(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate =
(HttpClient client) {
client.findProxy = (uri) {
//proxy all request to localhost:8888
return "PROXY localhost:8888";
client.badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
var dir = new Directory("./cookies");
await dir.create();
Response<String> response;
//response= await dio.get("");
response = await dio.get("");
response = await dio.get("");
You can’t perform that action at this time.