readBytes method

Future<ByteData> readBytes(
  1. Link link
)

Returns the resource data at the given Link's HREF, or throws a Resource.Exception

Implementation

Future<ByteData> readBytes(Link link) =>
    get(link).use((it) => it.read().then((data) => data.getOrThrow()));