delayed_proxy_http_client 1.0.0 copy "delayed_proxy_http_client: ^1.0.0" to clipboard
delayed_proxy_http_client: ^1.0.0 copied to clipboard

HttpClient implementation which can resolve proxy server asynchronously.

example/delayed_proxy_http_client_example.dart

import 'dart:io';

import 'package:delayed_proxy_http_client/delayed_proxy_http_client.dart';

void main() async {
  final client = DelayedProxyHttpClient();
  client.findProxyAsync = (url) async {
    await Future.delayed(const Duration(seconds: 3));
    return url.host == "pub.dev" ? "PROXY localhost:3128" : "DIRECT";
  };

  final request = await client.getUrl(Uri.parse("https://pub.dev"));
  final response = await request.close();
  await stdout.addStream(response);
}
0
likes
130
pub points
3%
popularity

Publisher

verified publisherky1vstar.dev

HttpClient implementation which can resolve proxy server asynchronously.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on delayed_proxy_http_client