diff --git a/src/Jenssegers/Chef/Chef.php b/src/Jenssegers/Chef/Chef.php index 508df52..3faeb55 100644 --- a/src/Jenssegers/Chef/Chef.php +++ b/src/Jenssegers/Chef/Chef.php @@ -29,7 +29,7 @@ function __construct($server, $client, $key, $version = '0.11.x', $enterprise = $this->key = $key; $this->version = $version; $this->reportingVersion = $reportingVersion; - + // get private key content if (file_exists($key)) { @@ -53,9 +53,9 @@ function __construct($server, $client, $key, $version = '0.11.x', $enterprise = * @param string $endpoint * @return mixed */ - function get($endpoint) + function get($endpoint, $data = FALSE) { - return $this->api($endpoint); + return $this->api($endpoint, 'GET', $data); } /** @@ -153,7 +153,7 @@ function api($endpoint, $method = 'GET', $data = FALSE) curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->timeout); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); - + // most people are using self-signed certs for chef, so its easiest to just // disable ssl verification curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);