public function rmdir($key, $recursive = false)
{
$query = array('dir' => 'true');
if ($recursive === true) {
$query['recursive'] = 'true';
}
$request = $this->guzzleclient->delete($this->buildKeyUri($key), null, null, array('query' => $query));
$response = $request->send();
$body = $response->json();
if (isset($body['errorCode'])) {
throw new EtcdException($body['message'], $body['errorCode']);
}
return $body;
}