saveRequest method

  1. @protected
Future<void> saveRequest()

The actual loading process is done from the API when it is saved.

By overriding, it is possible to use plugins, etc. in addition to simply saving to the URL.

Implementation

@protected
Future<void> saveRequest() async {
  final res = await Api.post(
    postEndpoint,
    headers: postHeaders,
    body: toRequest(filterOnSave(toCollection(this))),
  );
  onCatchResponse(res);
}