request() public method

Returns the result from the remote server.
public request ( string $method, string $path, Message $message = null ) : Message
$method string
$path string
$message eZ\Publish\Core\REST\Common\Message
return eZ\Publish\Core\REST\Common\Message
 /**
  * Tests that ConnectionException is thrown
  *
  * @expectedException \eZ\Publish\Core\REST\Client\HttpClient\ConnectionException
  */
 public function testConnectionException()
 {
     $client = new Stream('http://localhost:54321');
     $client->request('GET', '/');
 }