Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import android.net.http.AndroidHttpClient;
- public class HttpManager {
- public static String getData(String uri) {
- HttpClient client = AndroidHttpClient.AndroidHttpClient.netInstance("AndroidAgaent");
- HttpGet request = New HttpGet(uri);
- HttpResponse response;
- try {
- response = client.execute(request);
- return EntiyUtils.toString(response.getEntinity());
- } catch (Exception e) {
- e.printStackTrace();
- return null;
- } finally {
- client.close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement