protected function _writeData($path, $data, $method = 'PUT') 
    {
        $jsonData = json_encode($data);
        $header = array(
            'Content-Type: ' . $this->_contentType,
            'Content-Length: ' . strlen($jsonData)
        );
        $this->_addHeaderAuthentication($header);

        try {
            $ch = $this->_getCurlHandler($path, $method);
            curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
            $return = $this->_parseCurlResponse(curl_exec($ch));
            curl_close($ch);
        } catch (\Exception $e) {
            $return = null;
        }
        return $return;
    }
protected function _writeData($path, $data, $method = 'PUT') 
    {
        $jsonData = json_encode($data);
        $header = array(
            'Content-Type: ' . $this->_contentType,
            'Content-Length: ' . strlen($jsonData)
        );
        $this->_addHeaderAuthentication($header);

        try {
            $ch = $this->_getCurlHandler($path, $method);
            curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
            $return = $this->_parseCurlResponse(curl_exec($ch));
            curl_close($ch);
        } catch (\Exception $e) {
            $return = null;
        }
        return $return;
    }
protected function _writeData ( $ path , $ data , $ method = 'PUT' ) { $ jsonData = json_encode ( $ data ) ; $ header = array ( 'Content-Type: ' . $ this -> _contentType , 'Content-Length: ' . strlen ( $ jsonData ) ) ; $ this -> _addHeaderAuthentication ( $ header ) ; try { $ ch = $ this -> _getCurlHandler ( $ path , $ method ) ; curl_setopt ( $ ch , CURLOPT_HTTPHEADER , $ header ) ; curl_setopt ( $ ch , CURLOPT_POSTFIELDS , $ jsonData ) ; $ return = $ this -> _parseCurlResponse ( curl_exec ( $ ch ) ) ; curl_close ( $ ch ) ; } catch ( \ Exception $ e ) { $ return = null ; } return $ return ; }
Handles data write RESTful calls

@param String $path Path
@param Mixed  $data Data
@param String $method Method

@return String Response
Handles data write RESTful calls