Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docusign_esign/client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ class ApiClient(object):

OAUTH_TYPES = (OAuthToken.__name__, OAuthUserInfo.__name__, Account.__name__, Organization.__name__, Link.__name__)

def __init__(self, host=None, header_name=None, header_value=None, cookie=None, oauth_host_name=None, base_path=None):
def __init__(self, host=None, header_name=None, header_value=None, cookie=None, oauth_host_name=None, base_path=None, connection_pool_kwargs=None):
"""
Constructor of the class.
"""

config = Configuration()
self.rest_client = RESTClientObject(configuration=config)
self.rest_client = RESTClientObject(configuration=config, connection_pool_kwargs=connection_pool_kwargs)
self.default_headers = {'X-DocuSign-SDK': 'Python'}
if header_name is not None:
self.default_headers[header_name] = header_value
Expand Down
4 changes: 3 additions & 1 deletion docusign_esign/client/api_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def getheader(self, name, default=None):

class RESTClientObject(object):

def __init__(self, pools_size=4, maxsize=None, configuration=None):
def __init__(self, pools_size=4, maxsize=None, configuration=None, connection_pool_kwargs=None):
# urllib3.PoolManager will pass all kw parameters to connectionpool
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
# https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
Expand All @@ -81,6 +81,8 @@ def __init__(self, pools_size=4, maxsize=None, configuration=None):
addition_pool_args = {}
if configuration.assert_hostname is not None:
addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
if connection_pool_kwargs is not None:
addition_pool_args.update(connection_pool_kwargs)

if maxsize is None:
if configuration.connection_pool_maxsize is not None:
Expand Down