chrome.webRequest API,捕获POST数据? [英] chrome.webRequest API, Capture POST data?

查看:1849
本文介绍了chrome.webRequest API,捕获POST数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用chrome。* API开发Google Chrome扩展程序。我正在尝试分析来自浏览器的传出请求。
如果我在我的background.html中运行它:

I've just started developing a Google Chrome extension using the chrome.* API. I'm trying to analyse outgoing requests from the browser. If I run this in my background.html:

chrome.webRequest.onBeforeSendHeaders.addListener(
        function (details) {            
            if (details.method == "POST") {
                alert(JSON.stringify(details)); 
            }
        },
        { urls: ["<all_urls>"]}
    );

我收到每个请求的通知,但似乎我无法访问http post参数。我使用额外的内容脚本获取这些参数,但是不能通过chrome.webRequest对象访问参数吗?

I get a notification on each request, but it seems I don't have access to http post parameters. I get these parameters with an additional content script, but isn't it possible to access the parameters through the chrome.webRequest object?

推荐答案

现在这是不可能的,你可以监控此Chromium问题更新(点击右上角的星号以获取电子邮件通知)。

This is not possible for now, you can monitor this Chromium issue for updates (click a star in the top-right corner to get email notifications).

这篇关于chrome.webRequest API,捕获POST数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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