public function findRevisions($docId, $revisions = null)
    {
        $path = '/'.$this->databaseName.'/'.urlencode($docId);
        if (is_array($revisions)) {
            // Fetch documents of only the specified leaf revisions.
            $path .= '?open_revs='.json_encode($revisions);
        } else {
            // Fetch documents of all leaf revisions.
            $path .= '?open_revs=all';
        }
        // Set the Accept header to application/json to get a JSON array in the
        // response's body. Without this the response is multipart/mixed stream.
        return $this->httpClient->request(
            'GET',
            $path,
            null,
            false,
            ['Accept' => 'application/json']
        );
    }