fail method

void fail(
  1. AgEndpoint endpoint,
  2. AgApiException error, {
  3. AgHttpMethod method = AgHttpMethod.get,
})

Makes method requests to endpoint throw error, the way the real provider reports a failed request.

Implementation

void fail(
  AgEndpoint endpoint,
  AgApiException error, {
  AgHttpMethod method = AgHttpMethod.get,
}) {
  _replies[_key(method, endpoint)] = _Reply(error: error);
}