@Test(expected = IOException.class) public void timeoutTest() throws IOException { final HttpUrl mockUrl = mockServ.url("/"); OkHttpScratch okHttp = new OkHttpScratch.Builder() .setTimeoutConn(3).setTimeoutRd(3).setTimeoutWr(3) .build(); okHttp.get(mockUrl.toString()); }
public ResponseData get(String url) throws IOException { final Request req = new Request.Builder().url(url).build(); final Response rep = client.newCall(req).execute(); return toResponseData(rep); }
OkHttpScratch { public ResponseData get(String url) throws IOException { final Request req = new Request.Builder().url(url).build(); final Response rep = client.newCall(req).execute(); return toResponseData(rep); } }
OkHttpScratch { public ResponseData get(String url) throws IOException { final Request req = new Request.Builder().url(url).build(); final Response rep = client.newCall(req).execute(); return toResponseData(rep); } private  OkHttpScratch(OkHttpClient client); }
OkHttpScratch { public ResponseData get(String url) throws IOException { final Request req = new Request.Builder().url(url).build(); final Response rep = client.newCall(req).execute(); return toResponseData(rep); } private  OkHttpScratch(OkHttpClient client); void shutdownClient(); void getAsync(String url, AsyncCallback act); ResponseData get(String url); }
OkHttpScratch { public ResponseData get(String url) throws IOException { final Request req = new Request.Builder().url(url).build(); final Response rep = client.newCall(req).execute(); return toResponseData(rep); } private  OkHttpScratch(OkHttpClient client); void shutdownClient(); void getAsync(String url, AsyncCallback act); ResponseData get(String url);  }