public function mkdir($key, $ttl = 0)
{
$data = array('dir' => 'true');
if ($ttl) {
$data['ttl'] = $ttl;
}
$request = $this->guzzleclient->put($this->buildKeyUri($key), null, $data, array('query' => array('prevExist' => 'false')));
$response = $request->send();
$body = $response->json();
if (isset($body['errorCode'])) {
throw new KeyExistsException($body['message'], $body['errorCode']);
}
return $body;
}