Skip to content

Commit

Permalink
Merge pull request #45 from OptimalBPM/master
Browse files Browse the repository at this point in the history
Add verify_certificate parameter.
  • Loading branch information
got-root committed Apr 1, 2015
2 parents 7f8c181 + 9953649 commit 9de65b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyexchange/connection.py
Expand Up @@ -24,11 +24,11 @@ def send(self, body, headers=None, retries=2, timeout=30, encoding="utf-8"):
class ExchangeNTLMAuthConnection(ExchangeBaseConnection):
""" Connection to Exchange that uses NTLM authentication """

def __init__(self, url, username, password, **kwargs):
def __init__(self, url, username, password, verify_certificate=True, **kwargs):
self.url = url
self.username = username
self.password = password

self.verify_certificate = verify_certificate
self.handler = None
self.session = None
self.password_manager = None
Expand Down Expand Up @@ -61,7 +61,7 @@ def send(self, body, headers=None, retries=2, timeout=30, encoding=u"utf-8"):
self.session = self.build_session()

try:
response = self.session.post(self.url, data=body, headers=headers)
response = self.session.post(self.url, data=body, headers=headers, verify = self.verify_certificate)
response.raise_for_status()
except requests.exceptions.RequestException as err:
log.debug(err.response.content)
Expand Down

0 comments on commit 9de65b8

Please sign in to comment.