public function get($url, $headers = array()) { return $this->send($this->messageFactory->request('GET', $url, $headers)); }
public function setUp() { if (!function_exists('stream_socket_enable_crypto')) { $this->markTestSkipped('TLS (HTTPS) not supported by your platform (HHVM?)'); } $url = 'https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/'; $this->loop = LoopFactory::create(); $browser = new Browser($this->loop); // check connectivity to given URL only once static $error = null; if ($error === null) { try { Block\await($browser->get($url), $this->loop); $error = false; } catch (Exception $e) { $error = $e->getMessage(); } } if ($error !== false) { $this->markTestSkipped('Unable to reach Gentoo ViewVC: ' . $error); } $this->viewvc = new Client($browser->withBase($url)); }