Should actually use requests session for web api...
This commit is contained in:
parent
baadb86d5d
commit
ebf1e6eb60
|
@ -38,7 +38,6 @@ class NationBuilderWebAPI(object):
|
|||
max_retries=None, **kwargs):
|
||||
self.config = config
|
||||
self.app = self.config.get_app()
|
||||
self.session = None
|
||||
|
||||
self.base_url = base_url or self.config.require(
|
||||
'nationbuilder', 'api.base_url')
|
||||
|
@ -69,7 +68,7 @@ class NationBuilderWebAPI(object):
|
|||
params['access_token'] = self.access_token
|
||||
|
||||
if request_method == 'GET':
|
||||
response = requests.get('{}/{}'.format(self.base_url, api_method),
|
||||
response = self.session.get('{}/{}'.format(self.base_url, api_method),
|
||||
params=params)
|
||||
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue