11 include "helper/server.inc";
15 server("proxy.inc", function($port) {
16 $request = new http\Client\Request("GET", "http://localhost:$port");
18 foreach (http\Client::getAvailableDrivers() as $driver) {
19 $client = new http\Client($driver);
20 $client->enqueue($request)->send();
21 if (!($client->getResponse($request) instanceof http\Client\Response)) {
25 $client->enqueue($request);
26 } catch (Exception $e) {
27 echo $e->getMessage(),"\n";
30 if (($response = $client->getResponse())) {
33 $client->enqueue($request);
40 (?:Failed to enqueue request; request already in queue