import utils.OkHttpApi;
导入okhttpAPI然后请求就好了
public void getData(String str1){
/**
* 发送请求
*/
OkHttpApi api = new OkHttpApi();
String run = null;
try {
run = api.run("https://api.qq/api/qq.info?qq="+str1);
} catch (IOException e) {
FRContext.getLogger().info("没有添加get请求地址");
e.printStackTrace();
}
JSONObject result = JSONObject.parseObject(run);
String code = result.getString("code");
String qq = result.getString("qq");
String name = result.getString("name");
String qlogo = result.getString("qlogo");
String lvzuan = result.getString("lvzuan");
Object[][] datas = new Object[][]{{"code", code},
{"qq", qq}, {"name", name}, {"qlogo", qlogo}, {"lvzuan", lvzuan}};
this.rowData = datas;
}