- case HTTP_POST:
- {
- http_request_body body;
- zval *fields = GET_PROP(obj, postFields), *files = GET_PROP(obj, postFiles);
+/* {{{ proto void HttpRequestPool::__construct([HttpRequest request[, ...]])
+ *
+ * Instantiate a new HttpRequestPool object. An HttpRequestPool is
+ * able to send several HttpRequests in parallel.
+ *
+ * Example:
+ * <pre>
+ * <?php
+ * $urls = array('www.php.net', 'pecl.php.net', 'pear.php.net')
+ * $pool = new HttpRequestPool;
+ * foreach ($urls as $url) {
+ * $req[$url] = new HttpRequest("http://$url", HTTP_HEAD);
+ * $pool->attach($req[$url]);
+ * }
+ * $pool->send();
+ * foreach ($urls as $url) {
+ * printf("%s (%s) is %s\n",
+ * $url, $req[$url]->getResponseInfo('effective_url'),
+ * $r->getResponseCode() == 200 ? 'alive' : 'not alive'
+ * );
+ * }
+ * ?>
+ * </pre>
+ */
+PHP_METHOD(HttpRequestPool, __construct)
+{
+ int argc = ZEND_NUM_ARGS();
+ zval ***argv = safe_emalloc(argc, sizeof(zval *), 0);
+ getObject(http_requestpool_object, obj);
+
+ if (SUCCESS == zend_get_parameters_array_ex(argc, argv)) {
+ int i;