fetchResource method
Implementation
Future<ResourceFetched> fetchResource(
String type,
String id, {
Map<String, String> headers = const {},
Map<String, String> filter = const {},
Iterable<String> include = const [],
Map<String, Iterable<String>> fields = const {},
Map<String, String> query = const {},
}) async {
final response = await send(
baseUri.resource(type, id),
Request.get()
..headers.addAll(headers)
..query.addAll(query)
..filter(filter)
..include(include)
..fields(fields));
return ResourceFetched(
response.http, response.document ?? (throw FormatException()));
}