onResponse method

  1. @override
void onResponse(
  1. Response response,
  2. ResponseInterceptorHandler handler
)

Called when the response is about to be resolved.

Implementation

@override
void onResponse(Response response, ResponseInterceptorHandler handler) {
  try {
    if (response.data['errcode'] == 401) {}
    if (response.data['errcode'] == -5) {}
  } catch (e) {}
  handler.next(response);
  // super.onResponse(response, handler);
}