fetchStream function
Fetch content as a stream from a HTTP(S) resource identified by url
.
Throws an ApiException
if fetching fails. Also response status codes other
than codes for success are thrown as exceptions.
Implementation
Future<Content> fetchStream(Uri url, {Map<String, String>? headers}) =>
headers != null
? HttpFetcher.simple().headers(headers).fetchStream(url)
: HttpFetcher.simple().fetchStream(url);