码迷,mamicode.com
首页 > 移动开发 > 详细

android okhttp的使用

时间:2018-08-03 01:18:34      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:body   class   return   print   new   oid   res   tostring   trace   

 OkHttpClient client = new OkHttpClient();
        String url = "";
        Request request = new Request.Builder()
                .url(url)
                .build();

        try {
            Response response = client.newCall(request).execute();
            return response.body().toString();
        } catch (IOException e) {
            e.printStackTrace();
        }

 

android okhttp的使用

标签:body   class   return   print   new   oid   res   tostring   trace   

原文地址:https://www.cnblogs.com/zquan/p/9410857.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!