protected function post(Url $url, $content = [], array $headers = [])
    {
        if (is_resource($content) || is_object($content)) {
            $headers['body'] = $content;
        } elseif (is_array($content)) {
            $headers['multipart'] = $this->convertQueryArrayToMultiPart($content);
        }

        try {
            return $this->getHttpInvoker()->post((string) $url, $headers);
        } catch (RequestException $exception) {
            throw $this->convertStatusCode(
                $exception->getResponse()->getStatusCode(),
                (string) $exception->getResponse()->getBody(),
                $exception
            );
        }
    }
protected function post(Url $url, $content = [], array $headers = [])
    {
        if (is_resource($content) || is_object($content)) {
            $headers['body'] = $content;
        } elseif (is_array($content)) {
            $headers['multipart'] = $this->convertQueryArrayToMultiPart($content);
        }

        try {
            return $this->getHttpInvoker()->post((string) $url, $headers);
        } catch (RequestException $exception) {
            throw $this->convertStatusCode(
                $exception->getResponse()->getStatusCode(),
                (string) $exception->getResponse()->getBody(),
                $exception
            );
        }
    }
protected function post ( Url $ url , $ content = [ ] , array $ headers = [ ] ) { if ( is_resource ( $ content ) || is_object ( $ content ) ) { $ headers [ 'body' ] = $ content ; } elseif ( is_array ( $ content ) ) { $ headers [ 'multipart' ] = $ this -> convertQueryArrayToMultiPart ( $ content ) ; } try { return $ this -> getHttpInvoker ( ) -> post ( ( string ) $ url , $ headers ) ; } catch ( RequestException $ exception ) { throw $ this -> convertStatusCode ( $ exception -> getResponse ( ) -> getStatusCode ( ) , ( string ) $ exception -> getResponse ( ) -> getBody ( ) , $ exception ) ; } }
Performs a POST on an URL, checks the response code and returns the
result.

@param Url $url Request url
@param resource|string|StreamInterface|array $content Entity body data or an array for POST fields and files
@param array $headers Additional header options
@return ResponseInterface
@throws CmisBaseException an more specific exception of this type could be thrown. For more details see
@see AbstractBrowserBindingService::convertStatusCode()
Performs a POST on an URL checks the response code and returns the result .