11 include "helper/server.inc";
15 class Observer implements SplObserver
17 #[ReturnTypeWillChange]
18 function update(SplSubject $client, http\Client\Request $request = null, StdClass $progress = null) {
20 if ($progress->info !== "prepare" && $client->getProgressInfo($request) != $progress) {
26 server("proxy.inc", function($port, $stdin, $stdout, $stderr) {
27 foreach (http\Client::getAvailableDrivers() as $driver) {
28 $client = new http\Client($driver);
29 $client->attach(new Observer);
30 $client->enqueue(new http\Client\Request("GET", "http://localhost:$port/"));