Skip to content

Commit

Permalink
Merge pull request #61 from diskovod/patch-2
Browse files Browse the repository at this point in the history
Fixed sort issue (Fixed URL encoding for filter requests)
  • Loading branch information
diskovod authored Oct 20, 2020
2 parents 1695b31 + 2ea3834 commit 4288be9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mailjet_rest/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ def api_call(auth, method, url, headers, data=None, filters=None, resource_id=No
req_method = getattr(requests, method)

try:
response = req_method(url, data=data, params=filters, headers=headers, auth=auth,
filters_str = None
if filters:
filters_str = "&".join("%s=%s" % (k, v) for k, v in filters.items())
response = req_method(url, data=data, params=filters_str, headers=headers, auth=auth,
timeout=timeout, verify=True, stream=False)
return response

Expand Down

0 comments on commit 4288be9

Please sign in to comment.