private function getHTTPResponse(
    $method,
    $path,
    RequestOptions $options = null
  )
  {
    $client = new Client();

    // Build body
    $body = new PostBody();

    if ($options)
    {
      foreach ($options->getPostParams() as $name => $value)
      {
        $body->setField($name, $value);
      }
    }

    // Prepare the request
    $request = new Request(
      $method,
      $this->url . $path,
      [],
      $body,
      []
    );

    // Get response
    $response = $client->send($request);
    $body = json_decode($response->getBody());

    if (isset($body->data))
    {
      return $body->data;
    }
    else
    {
      throw new \Exception('Error calling ' . $method . ' to: ' . $path);
    }
  }