Skip to content

Commit

Permalink
Merge pull request #118 from JacksonChen666/less-hacky-request-method
Browse files Browse the repository at this point in the history
Use requests.request instead of getting attrs to make requests
  • Loading branch information
JacksonChen666 committed Aug 6, 2023
2 parents 43135aa + 1c2c50d commit 3f1cc94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synadm/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def query(self, method, urlpart, params=None, data=None, token=None,
override_verify = verify

try:
resp = getattr(requests, method)(
url, headers=self.headers, timeout=self.timeout,
resp = requests.request(
method, url, headers=self.headers, timeout=self.timeout,
params=params, json=data, verify=override_verify
)
if not resp.ok:
Expand Down

0 comments on commit 3f1cc94

Please sign in to comment.