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. Unable to load configuration. - action - file:/F:/apache-tomcat-8.0.30/webapps/test1Struts2/WEB-INF/classes/struts.xml:11:71

    Unable to load configuration. - action - file:/F:/apache-tomcat-8.0.30/webapps/test1Struts2/WEB-INF/ ...

  2. 2018年中国研究生数学建模竞赛C题 二等奖 赛题论文

    2018年中国研究生数学建模竞赛C题 对恐怖袭击事件记录数据的量化分析 恐怖袭击是指极端分子或组织人为制造的.针对但不仅限于平民及民用设施的.不符合国际道义的攻击行为,它不仅具有极大的杀伤性与破坏力, ...

  3. 拯救者Y720-gtx1050-window10-配置tensorflow-gpu环境

    https://www.cnblogs.com/31415926535x/p/10536572.html 概述 因为选修了数字图像这门课,,要做一个人脸识别的项目,和室友打算利用tensorflow来 ...

  4. javascript宏任务和微任务

    函数 // 你不能改变一个函数的 name 属性的值, 因为该属性是只读的 var object = { // someMethod 属性指向一个匿名函数 someMethod: function() ...

  5. BZOJ-1- 4868: [Shoi2017]期末考试-三分

    三分出成绩时间,假设当前出成绩最优,那么提前就会调增老师,增加不愉快度多于少等待的:如果延迟时间. 那么等待更久,增加的不愉快度也将多余少调增剩省下的. 于是:对于当前点,两边都是有单调性的. 就是说 ...

  6. String,StringBuffer与StringBuilder的区别|线程安全与线程不安全

    https://www.cnblogs.com/xingzc/p/6277581.html

  7. IE8 兼容性总结

    rgba 颜色格式 IE8 不支持 rgba(0, 0, 0, .5) 这种颜色格式. 解决方案:可以利用一张半透明的 png 图片来兼容 IE8. flexbox 根据 caniuse 给出的数据, ...

  8. 一个用SAM维护多个串的根号特技

    一个用SAM维护多个串的根号特技 基本介绍 在多个串的字符串题中,往往会出现一类题需要用到某个子串是否在一些母串中出现.此时对于 \(\text{parent}\) 树的 \(\text{right} ...

  9. BZOJ.5289.[AHOI/HNOI2018]排列(贪心 heap)

    BZOJ LOJ 洛谷 \(Kelin\)写的挺清楚的... 要求如果\(a_{p_j}=p_k\),\(k\lt j\),可以理解为\(k\)要在\(j\)之前选. 那么对于给定的\(a_j=k\) ...

  10. 逻辑运算的妙用-Single Number

    题目:一个int的array,除了一个元素只有一个其余的都是两个,找到这一个的元素. 使用:逻辑运算 XOR异或运算 关于逻辑运算的总结[转] &&和||:逻辑运算符 &和|: ...