Skip to content

Commit

Permalink
adding "Bearer: " prefix to API key header
Browse files Browse the repository at this point in the history
  • Loading branch information
shuttgl authored Apr 28, 2022
1 parent c1ded2d commit 8f9a873
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ordflow/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __get(self, url):
Response to GET request
"""
headers = {"accept": "*/*",
"Authorization": self._API_KEY}
"Authorization": "Bearer: " + self._API_KEY}
response = requests.get(url, headers=headers)
if not response.ok:
raise ValueError("{}: {}".format(response.reason, response.text[1:-1]))
Expand Down Expand Up @@ -81,7 +81,7 @@ def __post(self, url, headers={}, json=None, data=None, files=None):
"""
# TODO: Use **kwargs instead
basic_headers = {"accept": "*/*",
"Authorization": self._API_KEY}
"Authorization": "Bearer: " + self._API_KEY}
basic_headers.update(headers)
response = requests.post(url,
headers=basic_headers,
Expand Down

0 comments on commit 8f9a873

Please sign in to comment.