onRequest method

void onRequest(
  1. RequestOptions options,
  2. RequestInterceptorHandler handler
)
override

Called when the request is about to be sent.

Implementation

void onRequest(RequestOptions options, handler) {
  options.extra.addAll({
    'showInternalServerErrors': exceptionOptions.showInternalServerErrors
  });
  options.extra
      .addAll({'showNetworkErrors': exceptionOptions.showNetworkErrors});
  options.extra.addAll(
      {'showValidationErrors': exceptionOptions.showValidationErrors});

  return handler.next(options);
}