public function rm($key)
    {
        try {
            $response = $this->guzzleclient->delete($this->buildKeyUri($key));
        } catch (BadResponseException $e) {
            $response = $e->getResponse();
        }
        $body = json_decode($response->getBody(), true);
        if (JSON_ERROR_NONE !== json_last_error()) {
            throw new RuntimeException('Unable to parse response body into JSON: ' . json_last_error());
        }

        if (isset($body['errorCode'])) {
            throw new EtcdException($body['message'], $body['errorCode']);
        }

        return $body;
    }
public function rm($key)
    {
        try {
            $response = $this->guzzleclient->delete($this->buildKeyUri($key));
        } catch (BadResponseException $e) {
            $response = $e->getResponse();
        }
        $body = json_decode($response->getBody(), true);
        if (JSON_ERROR_NONE !== json_last_error()) {
            throw new RuntimeException('Unable to parse response body into JSON: ' . json_last_error());
        }

        if (isset($body['errorCode'])) {
            throw new EtcdException($body['message'], $body['errorCode']);
        }

        return $body;
    }
public function rm ( $ key ) { try { $ response = $ this -> guzzleclient -> delete ( $ this -> buildKeyUri ( $ key ) ) ; } catch ( BadResponseException $ e ) { $ response = $ e -> getResponse ( ) ; } $ body = json_decode ( $ response -> getBody ( ) , true ) ; if ( JSON_ERROR_NONE !== json_last_error ( ) ) { throw new RuntimeException ( 'Unable to parse response body into JSON: ' . json_last_error ( ) ) ; } if ( isset ( $ body [ 'errorCode' ] ) ) { throw new EtcdException ( $ body [ 'message' ] , $ body [ 'errorCode' ] ) ; } return $ body ; }
remove a key
@param string $key
@return array|stdClass
@throws EtcdException
remove a key