DioException.receiveTimeout constructor

DioException.receiveTimeout({
  1. required Duration timeout,
  2. required RequestOptions requestOptions,
  3. Object? error,
})

Implementation

factory DioException.receiveTimeout({
  required Duration timeout,
  required RequestOptions requestOptions,
  Object? error,
}) =>
    DioException(
      type: DioExceptionType.receiveTimeout,
      requestOptions: requestOptions,
      response: null,
      error: error,
      message: 'The request took longer than $timeout to receive data. '
          'It was aborted. '
          'To get rid of this exception, try raising the '
          'RequestOptions.receiveTimeout above the duration of $timeout or '
          'improve the response time of the server.',
    );