Closed adrienverge closed 4 years ago
I updated the pull request thanks to your suggestion. Here is the diff since last time:
--- a/aiocouch/couchdb.py
+++ b/aiocouch/couchdb.py
@@ -41,4 +41,4 @@ class CouchDB(object):
return await self._server._all_dbs(**params)
async def info(self):
- return await self._server._get('/')
+ return await self._server._info()
--- a/aiocouch/remote.py
+++ b/aiocouch/remote.py
@@ -103,6 +103,10 @@ class RemoteServer(object):
await self._http_session.close()
await asyncio.sleep(0.250 if has_ssl_conn else 0)
+ @raises(401, "Invalid credentials")
+ async def _info(self):
+ return await self._get("/")
+
@raises(401, "Authentification failed, check provided credentials.")
async def _check_session(self):
await self._get("/_session")
Add function to get CouchDB server information (i.e.
GET /
). This allows, for example, getting the server version with: