Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
maitham committed Nov 8, 2021
1 parent 34867e3 commit e2900d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "vital"
version = "0.3.0"
version = "0.3.2"
description = ""
authors = ["maitham <[email protected]>"]
license = "GNU"
Expand Down
7 changes: 4 additions & 3 deletions vital/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ def post(self, path, data, is_json=True, params={}, headers={}):
"""Make a post request."""
return self._post(path, data, is_json, params, self.session, headers)

def get(self, path, params={}):
def get(self, path, params={}, headers={}):
"""Make a get request."""
return self._get(path, params, self.session)
return self._get(path, params, self.session, headers)

def delete(self, path, params={}):
"""Make a delete request."""
Expand Down Expand Up @@ -112,10 +112,11 @@ def _post(self, path, data, is_json, params={}, session=None, headers={}):
session=session,
)

def _get(self, path, params={}, session=None):
def _get(self, path, params={}, session=None, headers={}):
headers = {
"Authorization": f"Bearer {self.token_handler.access_token}",
"Accept-Encoding": "deflate",
**headers,
}
return get_request(
urljoin(
Expand Down

0 comments on commit e2900d8

Please sign in to comment.