diff options
author | lambadalambda <[email protected]> | 2017-09-08 07:45:23 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2017-09-08 07:45:23 +0200 |
commit | 71d1038b323a5c949c4480a552a77855b5a1f5c3 (patch) | |
tree | a95521f4650c319f68bba421e7aafb72cee8b44c /mastodon | |
parent | c8490be2a717467c61381245e0fa2793a48c57ae (diff) | |
download | mastodon.py-71d1038b323a5c949c4480a552a77855b5a1f5c3.tar.gz |
Send params as part of the query in GET requests
Using the data argument will send them form-encoded like for the other requests, which isn't parsed by many servers for GET requests.
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index c835bac..cd641e5 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -923,7 +923,7 @@ class Mastodon: | |||
923 | response_object = None | 923 | response_object = None |
924 | try: | 924 | try: |
925 | if method == 'GET': | 925 | if method == 'GET': |
926 | response_object = requests.get(self.api_base_url + endpoint, data = params, headers = headers, files = files, timeout = self.request_timeout) | 926 | response_object = requests.get(self.api_base_url + endpoint, params = params, headers = headers, files = files, timeout = self.request_timeout) |
927 | 927 | ||
928 | if method == 'POST': | 928 | if method == 'POST': |
929 | response_object = requests.post(self.api_base_url + endpoint, data = params, headers = headers, files = files, timeout = self.request_timeout) | 929 | response_object = requests.post(self.api_base_url + endpoint, data = params, headers = headers, files = files, timeout = self.request_timeout) |