onRequest<ResponseType, InnerType> method
ApiRequest<ResponseType, InnerType>
onRequest<ResponseType, InnerType>(
- 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) {
if (kDebugMode) {
print(
'${request.isMultipart} in headers interceptor: ${request.headers}, ');
}
var header = <String, String>{};
header.addAll(headers);
header.addAll(request.headers);
if (kDebugMode) {
print(
'${request.isMultipart} in headers interceptor: ${request.headers}, ');
}
return request.copyWith(headers: header);
}