function getDoc($documentId, $data = null) { $url = '/' . $this->db . '/' . $documentId; $request = new CouchDB_Request($this->host, $this->port, $url, 'GET', json_encode($data)); return $request->send(); }
function send($url, $method = 'get', $data = NULL) { $url = '/' . $this->db . (substr($url, 0, 1) == '/' ? $url : '/' . $url); $request = new CouchDB_Request($this->host, $this->port, $url, $method, $data, $this->username, $this->password); return $request->send(); }