getManifestJsonFromURL function
Get the manifest from a URL Optionally specify the format (mime type) if not in the header
Implementation
Future<String?> getManifestJsonFromURL(final String url, {final String? format})
async {
// Download from url
final response = await http.get(Uri.parse(url));
// Get manifest
return getFileManifestFormat(
fileBytes: response.bodyBytes,
format: response.headers['content-type'] ?? format ?? 'image/jpeg',
);
}