/**
  * @see http://explorer.nuxeo.com/nuxeo/site/distribution/current/listOperations List of available operations
  * @param string $operation
  * @return NuxeoRequest
  */
 public function newRequest($operation)
 {
     $request = $this->client->createRequest(Request::POST, $operation, $this->headers);
     $request->setAuth($this->auth->getUsername(), $this->auth->getPassword());
     $newRequest = new NuxeoRequest($request);
     return $newRequest;
 }
 /**
  * @param $url
  * @param BasicAuth $auth
  * @param array $headers
  * @throws NuxeoClientException
  */
 public function __construct($url, BasicAuth $auth, $headers = array('Content-Type' => 'application/json+nxrequest'))
 {
     //TODO: use headers
     $this->client = new NuxeoClient($url, $auth->getUsername(), $auth->getPassword());
 }