stream method

  1. @override
Future<Stream<List<int>>> stream()
override

Raw bytes stream of the content.

A byte stream can be useful when sniffers only need to read a few bytes at the beginning of the file.

Implementation

@override
Future<Stream<List<int>>> stream() async {
  final HttpClientRequest request = await HttpClient().getUrl(uri);
  final HttpClientResponse response = await request.close();
  return response;
}