lib/Doctrine/CouchDB/CouchDBClient.php
public function postDocument(array $data)
    {
        $path = '/'.$this->databaseName;
        $response = $this->httpClient->request('POST', $path, json_encode($data));

        if ($response->status != 201) {
            throw HTTPException::fromResponse($path, $response);
        }

        return [$response->body['id'], $response->body['rev']];
    }
public function postDocument(array $data)
    {
        $path = '/'.$this->databaseName;
        $response = $this->httpClient->request('POST', $path, json_encode($data));

        if ($response->status != 201) {
            throw HTTPException::fromResponse($path, $response);
        }

        return [$response->body['id'], $response->body['rev']];
    }
public function postDocument ( array $ data ) { $ path = '/' . $ this -> databaseName ; $ response = $ this -> httpClient -> request ( 'POST' , $ path , json_encode ( $ data ) ) ; if ( $ response -> status != 201 ) { throw HTTPException :: fromResponse ( $ path , $ response ) ; } return [ $ response -> body [ 'id' ] , $ response -> body [ 'rev' ] ] ; }
Execute a POST request against CouchDB inserting a new document, leaving the server to generate a uuid.

@param array $data

@throws HTTPException

@return array<id, rev>
Execute a POST request against CouchDB inserting a new document leaving the server to generate a uuid .