- Регистрация
- 01.10.2013
- Сообщения
- 1 204
- Благодарностей
- 316
- Баллы
- 83
C:
var traffic = instance.ActiveTab.GetTraffic();
var tt = project.Tables["trafficTable"];
tt.AddRow(new List<string>()
{
"Method",
"ResultCode",
"Url",
"ContentType",
"RequestHeaders",
"RequestCookies",
"RequestBody",
"ResponseHeaders",
"ResponseCookies",
"ResponseBody"
});
foreach(TrafficItem t in traffic)
{
var row = new List<string>()
{
t.Method,
t.ResultCode.ToString(),
t.Url,
t.ResponseContentType,
t.RequestHeaders,
t.RequestCookies,
t.RequestBody,
t.ResponseHeaders,
t.ResponseCookies,
t.ResponseBody == null ? "" : Encoding.UTF8.GetString(t.ResponseBody, 0, t.ResponseBody.Length)
};
tt.AddRow(row);
}