runWithHttpOverrides<R> method

R runWithHttpOverrides <R>(
  1. R body(
      ),
    1. HttpOverrides overrides,
    2. {ZoneSpecification zoneSpecification,
    3. Function onError}
    )

    Runs body in a fresh Zone using the overrides found in overrides.

    Note that overrides should be an instance of a class that extends HttpOverrides.

    Implementation

    static R runWithHttpOverrides<R>(R body(), HttpOverrides overrides,
        {ZoneSpecification zoneSpecification, Function onError}) {
      return _asyncRunZoned<R>(body,
          zoneValues: {_httpOverridesToken: overrides},
          zoneSpecification: zoneSpecification,
          onError: onError);
    }