- add a POST request to the pool
authorMichael Wallner <mike@php.net>
Thu, 8 Sep 2005 08:14:08 +0000 (08:14 +0000)
committerMichael Wallner <mike@php.net>
Thu, 8 Sep 2005 08:14:08 +0000 (08:14 +0000)
tests/HttpRequestPool_001.phpt

index 615bf6713c216382206804536c61fd59121761c8..9b98b749f21b62955945e5aa4ac7a803dc3dc553 100644 (file)
@@ -8,6 +8,7 @@ checkcls('HttpRequestPool');
 checkurl('www.php.net');
 checkurl('pear.php.net');
 checkurl('pecl.php.net');
+checkurl('dev.iworks.at');
 ?>
 --FILE--
 <?php
@@ -15,8 +16,10 @@ echo "-TEST\n";
 $pool = new HttpRequestPool(
     new HttpRequest('http://www.php.net/', HTTP_HEAD),
     new HttpRequest('http://pear.php.net/', HTTP_HEAD),
-    new HttpRequest('http://pecl.php.net/', HTTP_HEAD)
+    new HttpRequest('http://pecl.php.net/', HTTP_HEAD),
+    $post = new HttpRequest('http://dev.iworks.at/.print_request.php', HTTP_POST)
 );
+$post->addPostFields(array('a'=>1,'b'=>2)) ;
 $pool->send();
 foreach ($pool as $req) {
     echo $req->getUrl(), '=',
@@ -30,4 +33,5 @@ echo "Done\n";
 http://www.php.net/=200:200
 http://pear.php.net/=200:200
 http://pecl.php.net/=200:200
+http://dev.iworks.at/.print_request.php=200:200
 Done