processRequest method

Future<FittorRequest> processRequest(
  1. FittorRequest request
)

Executes all request interceptors in order

Each interceptor receives the request returned by the previous one.

request The initial request Returns the final processed request

Implementation

Future<FittorRequest> processRequest(FittorRequest request) async {
  var currentRequest = request;

  for (final interceptor in _interceptors) {
    currentRequest = await interceptor.onRequest(currentRequest);
  }

  return currentRequest;
}