/** * Perform a REST "put" method at a URL * * @param String $url the URL to "put" * @param Array $data the data to "post" * @param String $type the content type to use (optional) * @param String $charset the charset encoding to use (optional) * @return Array any decoded data returned from the method */ public static function put($url, $data, $type = NULL, $charset = NULL) { $type = first($type, self::$type); $charset = first($charset, self::$charset); $data = Data::to($type, $data); $text = CURL::put($url, $data, self::headers_for($type)); return self::decode($type, $text, 'put'); }