Chrome:发布数据的来源? [英] Chrome: Source of Post Data?

查看:209
本文介绍了Chrome:发布数据的来源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用开发人员工具使用Chrome 15来调查HTTP POST请求。发送请求后,在标题下的 Network 标签中,有一个名为 Form Data 的部分。本部分包含良好格式化的发布数据。但是:如何获得发布数据的来源,即请求的主体?



目前,我使用Firefox和Firebug来获取数据,或者我重建源格式化的表单数据。繁琐的...

解决方案

Chrome 29-56,甚至可能超越



<最后(可能已经是第28版),它很简单。只需点击表单数据旁边的查看来源即可: stack.imgur.com/hY8Mb.pngalt =DevTools截图>

另外,至少在版本56中,可以在标题 标签,位于请求有效载荷下。
$ b

旧版本




  • Chrome 27


    1. Name / Path

    2. 控制台中,写 har = ,然后粘贴HAR, 。
    3. 从上面开始计算您感兴趣的请求的位置,从0开始。将位置存储在: pos code>


    4. 要获得发布数据源,请执行: har.log.entries [pos] .request.postData .text



  • 更旧:


    1. 右键单击 Name / Pa

    2. >
    3. 控制台中,写 har = HAR,然后回车。


    4. 要获取发布数据源,请执行: har.request.postData.text



    5. $ b

      如果有一种更简单的方法,我很高兴听到它!


      I am using Chrome 15 with Developer Tools to investigate HTTP POST requests. After sending a request, in the Network tab under Headers there is a section called Form Data. This section contains the post data nicely formatted. However: How do I get the source of the post data, i.e. the body of the request?

      Currently, I use Firefox with Firebug to get that data, or I reconstruct the source from the formatted Form Data. Cumbersome...

      解决方案

      Chrome 29–56, and possibly beyond

      Finally (maybe already with version 28), it's simple. Just click on view source next to Form Data:

      Also, at least in version 56, post data may be found in the Headers tab, under Request Payload.

      Older versions

      • Chrome 27

        1. Right click in the Name/Path panel in the Network tab.

        2. Select: Copy all as HAR

        3. In the Console, write har=, then paste the HAR, and hit return.

        4. Count from the top the position of the request you are interested, starting at 0. Store the position in: pos

        5. To get the post data source, execute: har.log.entries[pos].request.postData.text

      • even older:

        1. Right click on the Name/Path of the entry in the Network tab.

        2. Select: Copy entry as HAR

        3. In the Console, write har=, then paste the HAR, and hit return.

        4. To get the post data source, execute: har.request.postData.text

      If there is a simpler way, I am happy to hear about it!

      这篇关于Chrome:发布数据的来源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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