Fetch
Fetch a single resource
withTempFile((sampleAac) {
try {
String baseURl =
'https://raw.githubusercontent.com/noojee/dcli/master/test/src/functions/fetch_downloads';
fetch(url: '$baseURl/sample.aac', saveToPath: sampleAac);
} on FetchException catch (e) {
print('Exception Thrown: ${e.errorCode} ${e.message}');
}
/// print the returned data including any errors.
if (exists(tmp)) {
print(read(tmp).toParagraph());
}
}, create: false
, suffix: 'acc');Fetch as single resource and show progress
Fetch multiple resource and show progress
Post data to a server
FetchData
FetchData.fromString
FetchData.fromFile
FetchData.fromBytes
FetchData.fromStream
Custom Headers
Last updated
Was this helpful?