description property
String
description
dio失败的描述
Implementation
String get description {
switch (this) {
/// It occurs when url is opened timeout.
case DioErrorType.connectTimeout:
return "connectTimeout";
/// It occurs when url is sent timeout.
case DioErrorType.sendTimeout:
return "sendTimeout";
///It occurs when receiving timeout.
case DioErrorType.receiveTimeout:
return "receiveTimeout";
/// When the server response, but with a incorrect status, such as 404, 503...
case DioErrorType.response:
return "response";
/// When the request is cancelled, dio will throw a error with this type.
case DioErrorType.cancel:
return "cancel";
/// Default error type, Some other Error. In this case, you can
/// use the DioError.error if it is not null.
case DioErrorType.other:
return "other";
}
}