2

我想監視從我的Chrome瀏覽器發送的所有http請求,並將所有http請求收集到另一臺服務器。Chrome WebRequest API可以監視http請求嗎?

我已閱讀This questionThese examples,但我不知道如何獲取請求的內容。

例如,當我瀏覽google.com在我的chrome瀏覽器這個Chrome擴展,這種擴展將發送以下的其他服務器將收集起來:

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... 

我無法找到如何獲得來自here的所有請求的內容是否可能?

回答

1

對不起,目前不可能。所有你可以得到的是標題。

+0

也許我唯一能做的就是使用[NPAPI](http://code.google.com/chrome/extensions/npapi.html) – pvd