How to get browser GET/POST parameters?

David_Z

Client
Регистрация
01.06.2022
Сообщения
20
Благодарностей
0
Баллы
1
Hi, I want to get the Query String Parameters(Form Data) shown below
but these parameters was generated by javascript so I can't find them in DOM or source.
Any ideas how to get these? as well as request headers
92949
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 415
Благодарностей
5 900
Баллы
113
Try using this code:
C#:
instance.UseTrafficMonitoring = true;

var traffic = instance.ActiveTab.GetTraffic();
foreach(var t in traffic) {
if (t.Url=="url of the request") {
return System.Text.Encoding.UTF8.GetString(t.ResponseBody);
}
}

return "Nothing found";
 
  • Спасибо
Реакции: David_Z

David_Z

Client
Регистрация
01.06.2022
Сообщения
20
Благодарностей
0
Баллы
1
Try using this code:
C#:
instance.UseTrafficMonitoring = true;

var traffic = instance.ActiveTab.GetTraffic();
foreach(var t in traffic) {
if (t.Url=="url of the request") {
return System.Text.Encoding.UTF8.GetString(t.ResponseBody);
}
}

return "Nothing found";
Thanks a lot, could you please show me a piece of code that could get request query string?
 

David_Z

Client
Регистрация
01.06.2022
Сообщения
20
Благодарностей
0
Баллы
1

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)