To add custom columns to the Web Sessions Listadd rules using FiddlerScript.

The BindUIColumn Attribute

To fill a custom column, add a method labeled with the BindUIColumn attribute. Fiddler will run the method on each session to fill the custom column. (To avoid exceptions, be sure that your method is robust and checks to ensure that objects exist before use!) For example:

Fill custom column with session HTTP Method

    public static BindUIColumn("HTTPMethod")
function CalcMethodCol(oS: Session){
if (null != oS.oRequest) return oS.oRequest.headers.HTTPMethod; else return String.Empty;
}

Fill custom column with time taken for session

    public static BindUIColumn("Time Taken")
function CalcTimingCol(oS: Session){
var sResult = String.Empty;
if ((oS.Timers.ServerDoneResponse > oS.Timers.ClientDoneRequest))
{
sResult = (oS.Timers.ServerDoneResponse - oS.Timers.ClientDoneRequest).ToString();
}
return sResult;
}

There are four overloads for BindUIColumn that allow you to set the width, display order, and whether the column should be sorted numerically.

BindUIColumn(string colName)

BindUIColumn(string colName, bool bSortColumnNumerically)

public BindUIColumn(string colName, int iColWidth)

public BindUIColumn(string colName, int iColWidth, int iDisplayOrder)

The AddBoundColumn method

Alternatively, you can call the AddBoundColumn() method. The first parameter is the name with which the column should be named, and the second parameter is the default width of the column. The third parameter is either a Fiddler Session Flag string, an @-prefixed-header name, or a JavaScript function that returns a string.

    static function Main()
{
FiddlerObject.UI.lvSessions.AddBoundColumn("ClientPort", 50, "X-ClientPort");
FiddlerObject.UI.lvSessions.AddBoundColumn("SentCookie1", 60, getSentCookie);
FiddlerObject.UI.lvSessions.AddBoundColumn("SentCookie2", 60, "@request.Cookie");
FiddlerObject.UI.lvSessions.AddBoundColumn("ReturnedCookie", 60, "@response.Set-Cookie");
} static function getSentCookie(oS: Session){ if (null != oS.oRequest) return oS.oRequest["Cookie"]; }

Add Columns to the Web Sessions List的更多相关文章

  1. The Web Sessions List

    The Web Sessions list contains the list of HTTP Requests that are sent by your computer. You can res ...

  2. Customize Web Sessions List

    To customize Fiddler's Web Sessions List, add rules using FiddlerScript to the OnBeforeRequest funct ...

  3. Web Sessions Installation

    展示不使用Terracotta DSO如何集群Web Sessions. 1.要求 1)jdk1.6或者更高版本 2)Terracotta 3.7或者更高版本 3)所有被集群的对象需要实现序列化,如果 ...

  4. Visual Studio发布Web项目报错:Unable to add 'xxx' to the Web site. Unable to add file 'xxx'. The specified file could not be encrypted.

    背景 Visual Studio下的Web项目 现象 发布时遇到Unable to add 'xxx' to the Web site.  Unable to add file 'xxx'. The ...

  5. Spark 2.x不支持ALTER TABLE ADD COLUMNS,没关系,我们改进下

    SparkSQL从2.0开始已经不再支持ALTER TABLE table_name ADD COLUMNS (col_name data_type [COMMENT col_comment], .. ...

  6. How to Add Columns to a DataGrid through Binding and Map Its Cell Values

    How to Add Columns to a DataGrid through Binding and Map Its Cell Values Lance Contreras, 7 Nov 2013 ...

  7. 自己动手为Spark 2.x添加ALTER TABLE ADD COLUMNS语法支持

    SparkSQL从2.0开始已经不再支持ALTER TABLE table_name ADD COLUMNS (col_name data_type [COMMENT col_comment], .. ...

  8. How to: Add SharePoint 2010 Search Web Parts to Web Part Gallery for Upgraded Site Collections

    When you upgrade to Microsoft SharePoint Server 2010, some of the new SharePoint Enterprise Search W ...

  9. Add custom and listview web part to a page in wiki page using powershell

    As we know, Adding list view web part is different from custom web part using powershell, what's mor ...

随机推荐

  1. 007 numpy数组文件的存取

    不知道这个有没有用,都整理了一番. 一:数组以二进制格式进行存储 1.说明 np.save与np.load是读写磁盘数组数据的两个重要函数. 默认情况下,数组以压缩的原始二进制格式保存在扩展名为npy ...

  2. pyqt text browser 设置文本

    pyqt text browser 设置文本 setHtml(u"Html") setPlainText(u"纯文本") setText(u"文本\n ...

  3. laravel启动过程简单解析

    :first-child{margin-top:0!important}img.plugin{box-shadow:0 1px 3px rgba(0,0,0,.1);border-radius:3px ...

  4. JavaEE 之 文件上传

    1.文件上传 a.配置mySpring-servlet.xml <bean id="multipartResolver" class="org.springfram ...

  5. Alpha(7/10)

    鐵鍋燉腯鱻 项目:小鱼记账 团队成员 项目燃尽图 冲刺情况描述 站立式会议照片 各成员情况 团队成员 学号 姓名 git地址 博客地址 031602240 许郁杨 (组长) https://githu ...

  6. php文件及文件夹操作(创建、删除、移动、复制)

    <?php /** * 操纵文件类 * * 例子: * FileUtil::createDir('a/1/2/3'); 测试建立文件夹 建一个a/1/2/3文件夹 * FileUtil::cre ...

  7. jmeter connection reset解决方法

    方法仅作参考: 1.修改HTTP请求下面的Impementation选项,改成HttpClient4 2.在user.properties文件内修改: hc.parameters.file=hc.pa ...

  8. 手机端input获取焦点弹出键盘时挡住input解决方案

    问题重现 原始页面:页面中有header.main.footer三部分,其中 header 和 footer 通过 position: fixed; 定位在浏览器顶部和底部. 其中,footer 中有 ...

  9. VMware5.5-添加数据中心,集群及主机

    首先介绍下硬盘的三种设置格式,这个要搞清楚 虚机硬盘的三种格式 厚置备延迟置零 厚置备,分配10g空间,虚拟机没开机时就分配了: 延迟置零,没开机之前只分配空间,里面的数据不抹零,当开机写入数据时再抹 ...

  10. BZOJ5057 : 区间k小值5

    整体二分,按时间顺序依次考虑对于权值落在$[l,r]$内的所有操作. 对于每个修改操作,若权值范围完全包含了$[l,r]$,那么在更深层的分治中它都完全包含它,对每个询问的贡献是定值,因此在当前层将贡 ...