title: PHP JasperReports Server API Error
body: <p>I am trying to ultimately run and display reports from a remote Jasper Server in a PHP application. What I am trying to do this with is the <a href="https://github.com/Jaspersoft/jrs-rest-php-client" rel="nofollow">jrs-rest-php-client</a> project on github.  </p>
  
  <p>The error:</p>
  
  <pre><code>Fatal error: Uncaught exception 'Jaspersoft\Exception\RESTRequestException' with message 'An unexpected HTTP status code was returned by the server' in C:\xampp\htdocs\jrs\vendor\src\Jaspersoft\Tool\RESTRequest.php:409 
  Stack trace: 
  #0 C:\xampp\htdocs\jrs\vendor\src\Jaspersoft\Tool\RESTRequest.php(479): Jaspersoft\Tool\RESTRequest-&gt;handleError(0, Array, false) 
  #1 C:\xampp\htdocs\jrs\vendor\src\Jaspersoft\Service\ReportService.php(40): Jaspersoft\Tool\RESTRequest-&gt;prepAndSend('https://jasper....', Array, 'GET', NULL, true) 
  #2 C:\xampp\htdocs\jrs\report.php(30): Jaspersoft\Service\ReportService-&gt;runReport('/Reports/Distri...', 'html') 
  #3 {main} thrown in C:\xampp\htdocs\jrs\vendor\src\Jaspersoft\Tool\RESTRequest.php on line 409
  </code></pre>
  
  <p>My PHP:</p>
  
  <pre><code>require_once __DIR__ . "/vendor/autoload.php";
  use Jaspersoft\Client\Client;
  $d = new Client(
      "http://jasper.server.com/jasperserver-pro",
      "username",
      "password",
      "organization"
  );  
  $info = $d-&gt;serverInfo();
  </code></pre>
  
  <p>Any ideas?</p>