Skip to content

Commit 4c0742b

Browse files
author
Danniel Hugo
committed
Add new header
1 parent 276776e commit 4c0742b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gerencianet/endpoints.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ def send(self, settings, params, body):
5151
'Authorization': 'Bearer {token}'.format(token=self.token['access_token'])
5252
}
5353

54+
if 'partner_token' in self.options:
55+
headers['partner_token'] = self.options['partner_token']
56+
5457
return requests.request(settings['method'], url, json=body, headers=headers)
5558

5659
def authenticate(self):
@@ -60,6 +63,9 @@ def authenticate(self):
6063
'api-sdk': 'python-{v}'.format(v=VERSION),
6164
}
6265

66+
if 'partner_token' in self.options:
67+
headers['partner_token'] = self.options['partner_token']
68+
6369
auth = (self.options['client_id'], self.options['client_secret'])
6470
auth_body = {'grant_type': 'client_credentials'}
6571

0 commit comments

Comments
 (0)