Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cloudant/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ def logout(self, **kwargs):
"""De-authenticate the connection's cookie."""
return self.delete(self._reset_path('_session'), **kwargs)

def head(self, path='', **kwargs):
"""
Make a HEAD request against the object's URI joined
with `path`. `kwargs` are passed directly to Requests.
"""
return self._make_request('head', path, **kwargs)

def get(self, path='', **kwargs):
"""
Make a GET request against the object's URI joined
Expand Down
3 changes: 3 additions & 0 deletions test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ def setUp(self):
response = self.db.put()
response.raise_for_status()

def testHead(self):
assert self.db.head().status_code == 200

def testGet(self):
assert self.db.get().status_code == 200

Expand Down