Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从web浏览器多次发送http请求_Http_Web Applications - Fatal编程技术网

从web浏览器多次发送http请求

从web浏览器多次发送http请求,http,web-applications,Http,Web Applications,出于测试目的,我希望从web浏览器多次发送相同的http请求,以便使用浏览器测试响应,而不使用CURL命令 有没有办法从web浏览器中执行此操作 e、 g: 在web浏览器中多次发送此请求 谢谢这: <script> var url = "http://abcxyz.com/style?font=sans"; for (var i=0; i < 10; i++) { var xhr = XMLHttpRequest(); xhr.open(url, true);

出于测试目的,我希望从web浏览器多次发送相同的http请求,以便使用浏览器测试响应,而不使用CURL命令

有没有办法从web浏览器中执行此操作

e、 g:

在web浏览器中多次发送此请求

谢谢

这:

<script>
var url = "http://abcxyz.com/style?font=sans";

for (var i=0; i < 10; i++) {
  var xhr = XMLHttpRequest();
  xhr.open(url, true);
  xhr.send();
}
</script>

变量url=”http://abcxyz.com/style?font=sans";
对于(变量i=0;i<10;i++){
var xhr=XMLHttpRequest();
open(url,true);
xhr.send();
}
向上述URL发送10个请求