Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 28a7790

Browse files
committed
Changed client to use Authorization header instead of GET parameter.
1 parent 825bea1 commit 28a7790

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

gophish/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ def execute(self, method, path, **kwargs):
1919
url = "{}{}".format(self.host, path)
2020
kwargs.update(self._client_kwargs)
2121
response = requests.request(
22-
method, url, params={"api_key": self.api_key}, **kwargs)
22+
method,
23+
url,
24+
headers={"Authorization": "Bearer {}".format(self.api_key)},
25+
**kwargs)
2326
return response
2427

2528

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name='gophish',
55
packages=['gophish', 'gophish.api'],
6-
version='0.2.4',
6+
version='0.2.5',
77
description='Python API Client for Gophish',
88
author='Jordan Wright',
99
author_email='python@getgophish.com',

0 commit comments

Comments
 (0)