onRequest<ResponseType, InnerType> method

  1. @override
ApiRequest<ResponseType, InnerType> onRequest<ResponseType, InnerType>(
  1. ApiRequest<ResponseType, InnerType> request
)
override

Intercepts the request and returns the modified request

Implementation

@override
ApiRequest<ResponseType, InnerType> onRequest<ResponseType, InnerType>(
  ApiRequest<ResponseType, InnerType> request,
) {
  // Headers already on the request win, so a per-call override beats the
  // defaults configured on this interceptor.
  return request.copyWith(headers: {...headers, ...request.headers});
}