retry static method

Future<Response> retry(
  1. Dio dio,
  2. RequestOptions options,
  3. String token
)

Retries a single request with the given token using dio.fetch, which bypasses the interceptor chain to avoid re-entrance.

Implementation

static Future<Response<dynamic>> retry(
  Dio dio,
  RequestOptions options,
  String token,
) {
  options.headers['Authorization'] = 'Bearer $token';
  return dio.fetch(options);
}