Exemple #1
0
 public static String getWebPage(final Request request) {
   try {
     return GeneralUtils.makeRequest(request).body().string();
   } catch (IOException e) {
     throw OnErrorThrowable.from(new Throwable("Failed to connect.", e));
   }
 }
Exemple #2
0
 public static String getWebPage(final String url) {
   return GeneralUtils.getWebPage(new Request.Builder().url(url).build());
 }