Chrome WebRequest API可以监视http请求吗? [英] Can chrome WebRequest API monitor the http request?

查看:278
本文介绍了Chrome WebRequest API可以监视http请求吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已经读过这个问题这些例子,但我不知道如何获取内容请求。



例如,当我使用此扩展程序在Chrome浏览器中浏览google.com时,此扩展程序将发送以下另一台将收集该扩展程序的服务器: / p>

  GET http://www.google.com/ HTTP / 1.1 
接受:text / html,application / xhtml + xml,* / *
Accept-Language:zh-CN
用户代理:Mozilla / 4.0(兼容; 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)
接受编码:gzip,deflate
代理连接:保持活跃
主机:www.google.com
Pragma:no-cache
Cookie:blabla ...

我无法找到所有来自< href =http://code.google.com/chrome/extensions/dev/experimental.webRequest.html#type-RequestFilter =nofollow noreferrer>这里是,那有可能吗?

解决方案

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


I want to monitor all the http request send from my chrome browser, and collect all the http request to another server.

I have read This question and These examples, but I don't know how to get the content of the request.

For example, when I browse google.com in my chrome browser with this chrome extension, this extension will send the following the another server which will collect it:

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

I can not find how to get the content of all the requests from here, is that possible?

解决方案

Sorry, it's not possible at the moment. All you can get is headers.

这篇关于Chrome WebRequest API可以监视http请求吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆