io_http 0.1.0+2 copy "io_http: ^0.1.0+2" to clipboard
io_http: ^0.1.0+2 copied to clipboard

A customized dart:io HttpClient, mostly works with dio_http_adapter to workaround the Host verification issue during SSL handshake.

example/main.dart

import 'package:io_http/io_http.dart';

void main(List<String> args) async {
  if (args == null || args.length < 2) {
    print('Usage: dart main.dart <URI> <HOST>');
    exit(1);
  }

  final uriArg = args[0];

  if (!uriArg.startsWith('https://')) {
    print('URI must start with https://');
    exit(1);
  }

  final uri = Uri.parse(uriArg);
  final host = args[1];
  final client = IoHttpClient();
  final req = await client.openUrl('get', uri, host);
  final resp = await req.close();
  print(resp.headers);
}
0
likes
40
pub points
3%
popularity

Publisher

verified publisherxinthink.com

A customized dart:io HttpClient, mostly works with dio_http_adapter to workaround the Host verification issue during SSL handshake.

Homepage
Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

More

Packages that depend on io_http