getManifestJsonFromURL function

Future<String?> getManifestJsonFromURL(
  1. String url, {
  2. String? format,
})

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 {
  final response = await http.get(Uri.parse(url));
  return getManifestWithValidation(
    fileBytes: response.bodyBytes,
    format: response.headers['content-type'] ?? format ?? 'image/jpeg',
  );
}