Clue\React\Buzz\Browser::get PHP Метод

get() публичный Метод

public get ( $url, $headers = [] )
    public function get($url, $headers = array())
    {
        return $this->send($this->messageFactory->request('GET', $url, $headers));
    }

Usage Example

 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));
 }
All Usage Examples Of Clue\React\Buzz\Browser::get