Skip to content

Commit

Permalink
verify argument added to client to allow people to pass custom cert c…
Browse files Browse the repository at this point in the history
…hains
  • Loading branch information
EandrewJones committed Sep 30, 2022
1 parent 6592059 commit ebd54f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doccano_client/beta/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ class DoccanoClient:

__slots__ = ["_base_url", "client_session"]

def __init__(self, base_url: str) -> None:
def __init__(self, base_url: str, verify: str = None) -> None:
"""Initialize a Doccano client with a base url and authorization token for headers"""
self._base_url = base_url
self.client_session = requests.Session()
if verify:
self.client_session.verify = verify
headers = {
"content-type": "application/json",
"accept": "application/json",
Expand Down

0 comments on commit ebd54f8

Please sign in to comment.