1 # http\Client http\Client::enqueue(http\Client\Request $request[, callable $cb])
3 Add another http\Client\Request to the request queue.
4 If the optional callback $cb returns true, the request will be automatically dequeued.
6 See http\Client::dequeue() and http\Client::send().
10 * http\Client\Request $request
11 The request to enqueue.
12 * Optional callable $cb
13 A callback to automatically call when the request has finished.
25 (new http\Client)->enqueue(new http\Client\Request("GET", "http://php.net"),
26 function(http\Client\Response $res) {
27 printf("%s returned %d\n", $res->getTransferInfo("effective_url"), $res->getResponseCode());
28 return true; // dequeue
33 http://php.net/ returned 200