1. 程式人生 > >android okhttp的使用

android okhttp的使用

exc android roi int tpc nts okhttp exec try

 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的使用