getPublicBlob method

Future getPublicBlob(
  1. ContentId contentId
)

Implementation

Future<dynamic> getPublicBlob(ContentId contentId) async {
  final resp = await get('/blob/${contentId.value}');
  if (resp.statusCode == HttpStatus.ok) {
    return resp.body;
  } else if (resp.statusCode == HttpStatus.notFound) {
    return null;
  }

  return Future.error(HttpResponseError(resp.statusCode, resp.body));
}