diff --git a/intercom/client.py b/intercom/client.py index ce37617b..71a03369 100644 --- a/intercom/client.py +++ b/intercom/client.py @@ -5,11 +5,14 @@ class Client(object): - def __init__(self, personal_access_token='my_personal_access_token'): + def __init__(self, personal_access_token='my_personal_access_token', http_session=None): self.personal_access_token = personal_access_token self.base_url = 'https://api.intercom.io' self.rate_limit_details = {} - self.http_session = requests.Session() + if http_session: + self.http_session = http_session + else: + self.http_session = requests.Session() @property def _auth(self):