toResponse static method
Implementation
static HttpResponse toResponse({dynamic from}) {
var json = tryCast<Map<Object?, Object?>>(from);
int resCode = int.tryParse(json?["code"]?.toString() ?? "") ?? 0;
String resMessage = json?["message"]?.toString() ?? "";
String? resBody = json?["body"]?.toString();
return HttpResponse(
resCode,
resMessage,
resBody,
);
}