package com.example.utils;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
public class GetWroldUtils {
public static String GetWroldUtils1(String path) {
HttpClient client=new DefaultHttpClient();
HttpGet get=new HttpGet(path);
try {
HttpResponse execute = client.execute(get);
if(execute.getStatusLine().getStatusCode()==200){
return EntityUtils.toString(execute.getEntity());
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;
public class GetWroldUtils {
public static String GetWroldUtils1(String path) {
HttpClient client=new DefaultHttpClient();
HttpGet get=new HttpGet(path);
try {
HttpResponse execute = client.execute(get);
if(execute.getStatusLine().getStatusCode()==200){
return EntityUtils.toString(execute.getEntity());
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}