downloadBytes method

Future<List<int>> downloadBytes(
  1. String url
)

Implementation

Future<List<int>> downloadBytes(String url) async {
  final response = await _client.get(Uri.parse(url));
  if (response.statusCode < 200 || response.statusCode >= 300) {
    throw DataleonApiException(
      'Failed to download bytes from $url',
      statusCode: response.statusCode,
    );
  }
  return response.bodyBytes;
}