toDataModel method

RequestOptions toDataModel()

Implementation

RequestOptions toDataModel() {
  return RequestOptions(
    url: url,
    body: body?.toDataModel(),
    offlinePolicyAction: offlinePolicyAction == null
        ? null
        : OfflinePolicyAction.fromIdentifier(
            offlinePolicyAction!.identifier!,
            retries: offlinePolicyAction!.retries,
          ),
    slowNetworkPolicyAction: slowNetworkPolicyAction == null
        ? null
        : SlowNetworkPolicyAction.fromIdentifier(
            slowNetworkPolicyAction!.identifier!,
            delay: Duration(),
            timeout: Duration(),
          ),
    cacheOptions: cacheOptions?.toDataModel(),
    cancelOnDispose: cancelOnDispose,
    headers: headers,
  );
}