dealResponse function

dynamic dealResponse({
  1. required Response response,
  2. required dynamic f(
    1. Response response
    ),
  3. dynamic url,
})

Implementation

dealResponse({
  required http.Response response,
  required f(http.Response response),
  url,
}) {
  //fixme 增加处理sentry的接口
  switch (response.statusCode) {
    case 401:
      print(jsonDecode(response.body));
      break;
    case 200:
    default:
      f(response);
      break;
  }
}