Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Jenssegers/Chef/Chef.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand All @@ -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);
}

/**
Expand Down Expand Up @@ -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);
Expand Down