Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在android中有没有停止/记录http请求的方法?_Android_Sockets_Http_Networking_Android Networking - Fatal编程技术网

在android中有没有停止/记录http请求的方法?

在android中有没有停止/记录http请求的方法?,android,sockets,http,networking,android-networking,Android,Sockets,Http,Networking,Android Networking,是否有任何应用程序或方法记录或处理http请求,甚至编辑它? 我尝试了一些代理应用程序,但没有任何帮助。 如果有任何应用程序不要求根。 如果我把模拟器(bluestackes)放在像wireshark这样的沙盒里呢?是的,HTTP GET public static InputStream getInputStreamFromUrl(String url) { InputStream content = null; try { HttpClient httpc

是否有任何应用程序或方法记录或处理http请求,甚至编辑它? 我尝试了一些代理应用程序,但没有任何帮助。 如果有任何应用程序不要求根。 如果我把模拟器(bluestackes)放在像wireshark这样的沙盒里呢?

是的,HTTP GET

public static InputStream getInputStreamFromUrl(String url) {
    InputStream content = null;
    try {
          HttpClient httpclient = new DefaultHttpClient();
          HttpResponse response = httpclient.execute(new HttpGet(url));
          content = response.getEntity().getContent();
    } catch (Exception e) {
          Log.("[GET REQUEST]", "Network exception", e);
    }
    return content;
}

// see http://androidsnippets.com/executing-a-http-get-request-with-httpclient

你可能想试试这个。不过,它似乎不支持编辑。