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.

io_http #

Pub Check Status BSD

A customized dart:io HttpClient implementation, to work around the "Hostname mismatch" issue when accessing URIs with an IP address (DNS over HTTP for example).

Most of the source code is extracted from the dart:io package, yet modified to leverage the SecureSocket.secure method to specify the host name used during SSL handshake.

Usage #

Get an IP address of the 'pub.dev' site:

ping pub.dev
PING pub.dev (216.239.38.21) 56(84) bytes of data.
64 bytes from any-in-2615.1e100.net (216.239.38.21): icmp_seq=1 ttl=112 time=88.7 ms

Or using a dart package like dns

Access it using [dio]:

final client = IoHttpClient();
final req = await client.openUrl('get', Uri.parse('https://216.239.38.21'), 'pub.dev');
final resp = await req.close();
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