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

Do the HTTP request.
public doRequest ( ) : array
Результат array HTTP response ['body' => ..., 'status' => ..., 'headers' => ...]
Пример #1
0
 /**
  * @group online
  */
 public function testDecodeGzip()
 {
     if (function_exists('gzdecode')) {
         $client = new Stream();
         $client->setUrl('https://github.com/fguillot/picoFeed');
         $result = $client->doRequest();
         $this->assertEquals('gzip', $result['headers']['Content-Encoding']);
         $this->assertEquals('<!DOC', substr(trim($result['body']), 0, 5));
     }
 }