fetchRelatedResource method
Fetches the related resource
identified by type
, id
, relationship
.
Optional arguments:
headers
- any extra HTTP headersquery
- a collection of parameters to be included in the URI query
Implementation
Future<RelatedResourceFetched> fetchRelatedResource(
String type,
String id,
String relationship, {
Map<String, List<String>> headers = const {},
Iterable<QueryEncodable> query = const [],
}) async =>
RelatedResourceFetched(await send(
_baseUri.related(type, id, relationship),
Request.get()
..headers.addAll(headers)
..query.mergeAll(query)));