add CommonRequest.execute

This commit is contained in:
Timi
2025-11-07 00:16:44 +08:00
parent fbcf21e990
commit a240c00996
2 changed files with 13 additions and 0 deletions

View File

@@ -59,4 +59,12 @@ public class TimiRequest extends GsonRequest {
}
return resp.getData();
}
@Override
public void execute() throws IOException {
TimiResponse<?> resp = getGson().fromJson(asJsonObject(), TypeToken.getParameterized(TimiResponse.class, Object.class).getType());
if (resp.isFail()) {
throw resp.toException();
}
}
}