import 'dart:async'; import 'package:get/get.dart'; import 'package:get/get_connect/http/src/request/request.dart'; //获取到相应的响应拦截 FutureOr responseInterceptor(Request request, Response response) async { if (response.statusCode != 200) { handleErrorStatus(response); return; } return response; } void handleErrorStatus(Response response) { switch (response.statusCode) { case 400: break; default: } return; }