Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.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
Google chrome chrome WebRequest API可以监视http请求吗?_Google Chrome_Google Chrome Extension_Xmlhttprequest_Webrequest - Fatal编程技术网

Google chrome chrome WebRequest API可以监视http请求吗?

Google chrome chrome WebRequest API可以监视http请求吗?,google-chrome,google-chrome-extension,xmlhttprequest,webrequest,Google Chrome,Google Chrome Extension,Xmlhttprequest,Webrequest,我想监视从chrome浏览器发送的所有http请求,并将所有http请求收集到另一台服务器 我已经读过了,但是我不知道如何获得请求的内容 例如,当我使用此chrome扩展在我的chrome浏览器中浏览google.com时,此扩展将向另一台收集它的服务器发送以下信息: GET http://www.google.com/ HTTP/1.1 Accept: text/html, application/xhtml+xml, */* Accept-Language: zh-CN User-Agent

我想监视从chrome浏览器发送的所有http请求,并将所有http请求收集到另一台服务器

我已经读过了,但是我不知道如何获得请求的内容

例如,当我使用此chrome扩展在我的chrome浏览器中浏览google.com时,此扩展将向另一台收集它的服务器发送以下信息:

GET http://www.google.com/ HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: zh-CN
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
Accept-Encoding: gzip, deflate
Proxy-Connection: Keep-Alive
Host: www.google.com
Pragma: no-cache
Cookie: blabla...

我找不到如何从中获取所有请求的内容,可能吗?

对不起,目前不可能。你所能得到的只是标题。

也许我唯一能做的就是在Chrome中使用WebRequest API是不可能的,但还有其他方法: