before method

Future before(
  1. ApiRequest request
)

This method gets called before every call to get, post, put, patch or delete. If this method throws an exception or returns anything other than null, the result is treated as response and the subsequent call to get, post, etc. will be skipped. (Useful for checking authorization.)

Implementation

Future<dynamic> before(ApiRequest request) async => null;