ResourceFetched constructor

ResourceFetched(
  1. Response rawResponse
)

Implementation

ResourceFetched(this.rawResponse) {
  final document = InboundDocument(rawResponse.document ??
      (throw FormatException('The document must not be empty')));
  resource = document.dataAsResource();
  included.addAll(document.included());
  meta.addAll(document.meta());
  links.addAll(document.links());
}