handle method
Implementation
@override
dynamic handle(Response response) {
if (response.statusCode != 200) {
throw Exception('Failed to load resource');
}
final Map<String, dynamic> jsonResult = jsonDecode(response.body.toString());
if (jsonResult['code'] != 1) {
throw Exception(jsonResult['message']);
}
return jsonResult['result'];
}