OkHttpUtils .get()//1.请求方式 .url("http://192.168.2.234:8080/apps/categories.json")//2.url地址 .build()//3.构件对象 .execute(new StringCallback() {//执行请求 @Override public void onError(Call call, Exception e, int id) { System.out.println("错误:" + e.getMessage()); } @Override public void onResponse(String response, int id) { System.out.println("回复:" + response); } });
HttpUtils的简单使用
猜你喜欢
转载自blog.csdn.net/zlhyy666666/article/details/86991768
今日推荐
周排行