Skip to content

Commit

Permalink
fix call
Browse files Browse the repository at this point in the history
  • Loading branch information
sim0nx committed Feb 24, 2024
1 parent 6e2aac5 commit 376bdb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shadowserver_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ def api_call(self, method: str, request_data: typing.Dict[str, typing.Any]) -> t
self.logger.debug('DATA: %s', json.dumps(request_data, indent=2))

request_data['apikey'] = self.api_key
request_bytes = json.dumps(request_data)
request_hmac = self._generate_hmac(request_bytes.encode())
request_bytes = json.dumps(request_data).encode()
request_hmac = self._generate_hmac(request_bytes)

response = self.session.post(url, data=request_bytes, headers={'HMAC2': request_hmac})
response = self.session.post(url, content=request_bytes, headers={'HMAC2': request_hmac})

if response.status_code != 200:
try:
Expand Down

0 comments on commit 376bdb1

Please sign in to comment.