1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
public class Example{
 OkHttpClient client = new OkHttpClient();
    String run(String url) throws IOException {
       Request request = new Request.Builder().url(url).get().addHeader()
             .addHeader()
             .build();
 
       Response response = client.newCall(request).execute();
       return response.body().string();
 
}
}
-------------------------------------------------------------------------
      Example getEx = new Example();        
      String response = getEx.run("받아오는 주소");
cs



OkHttp
Okio


+ Recent posts