src/Api.php
public function put($uri, array $data)
    {
        // PUT requests need an fopen wrapper, so we'll create a temporary one
        // for the data to submit...
        $json = json_encode($data);
        $file = fopen('php://temp', 'w+');
        fwrite($file, $json, strlen($json));
        fseek($file, 0);

        $options = array(
            CURLOPT_URL => $this->domain.'/'.ltrim($uri, '/'),
            CURLOPT_FOLLOWLOCATION => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_PUT => 1,
            CURLOPT_INFILE => $file,
            CURLOPT_INFILESIZE => strlen($json),
        );

        $result = $this->exec($options);

        fclose($file);

        return $result;
    }
public function put($uri, array $data)
    {
        // PUT requests need an fopen wrapper, so we'll create a temporary one
        // for the data to submit...
        $json = json_encode($data);
        $file = fopen('php://temp', 'w+');
        fwrite($file, $json, strlen($json));
        fseek($file, 0);

        $options = array(
            CURLOPT_URL => $this->domain.'/'.ltrim($uri, '/'),
            CURLOPT_FOLLOWLOCATION => 1,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_PUT => 1,
            CURLOPT_INFILE => $file,
            CURLOPT_INFILESIZE => strlen($json),
        );

        $result = $this->exec($options);

        fclose($file);

        return $result;
    }
public function put ( $ uri , array $ data ) { // PUT requests need an fopen wrapper, so we'll create a temporary one // for the data to submit... $ json = json_encode ( $ data ) ; $ file = fopen ( 'php://temp' , 'w+' ) ; fwrite ( $ file , $ json , strlen ( $ json ) ) ; fseek ( $ file , 0 ) ; $ options = array ( CURLOPT_URL => $ this -> domain . '/' . ltrim ( $ uri , '/' ) , CURLOPT_FOLLOWLOCATION => 1 , CURLOPT_RETURNTRANSFER => 1 , CURLOPT_PUT => 1 , CURLOPT_INFILE => $ file , CURLOPT_INFILESIZE => strlen ( $ json ) , ) ; $ result = $ this -> exec ( $ options ) ; fclose ( $ file ) ; return $ result ; }
Submit the data to cauditor API.

@param string $uri
@param array  $data

@return string|bool API response (on success) or false (on failure)
Submit the data to cauditor API .