onRequest method

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

The callback will be executed before the request is initiated.

Implementation

@override
FutureOr<dynamic> onRequest(
  RequestOptions options,
  RequestInterceptorHandler handler,
) {
  loggy.debug('\nURI: ${options.uri}');

  loggy.debug('\nREQUEST:\n${options.data}');

  super.onRequest(options, handler);
}