gpt4 book ai didi

fiddler 每秒发送相同的请求

转载 作者:行者123 更新时间:2023-12-02 01:07:40 25 4
gpt4 key购买 nike

我想用 fiddler 发送一个请求,并且想每秒发送相同的请求。有什么办法可以用 fiddler 实现吗?

最佳答案

我会使用 JMeter对于这些类型的测试,但为了回答您的问题,这里是我从 here 获得的示例脚本

public static ToolsAction("Crawl Sequential URLs") 
function doCrawl(){
var sBase: String;
var sInt: String;

sBase = FiddlerObject.prompt("Enter base URL with ## in place of the start integer", "http://www.example.com/img##.jpg");
sInt = FiddlerObject.prompt("Start At", "1");
var iFirst = int.Parse(sInt);
sInt = FiddlerObject.prompt("End At", "12");
var iLast = int.Parse(sInt);

for (var x=iFirst; x<=iLast; x++)
{
//Replace 's' with your HTTP Request. Note: \ is a special character in JScript
// If you want to represent a backslash in a string constant, double it like \\
var s = "GET " + sBase.Replace("##", x.ToString()) + " HTTP/1.0\r\n\r\n";
var b=false;
while(!b){
try{
FiddlerObject.utilIssueRequest(s);
b=true;
}
catch(e){
var iT = Environment.TickCount + 10000;
FiddlerObject.StatusText = "Waiting 10 sec because we have too many requests outstanding...";
while (iT > Environment.TickCount){ Application.DoEvents(); }
}
}
}
}

关于 fiddler 每秒发送相同的请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20722015/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com