aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlambadalambda <[email protected]>2017-09-08 07:45:23 +0200
committerGitHub <[email protected]>2017-09-08 07:45:23 +0200
commit71d1038b323a5c949c4480a552a77855b5a1f5c3 (patch)
treea95521f4650c319f68bba421e7aafb72cee8b44c /mastodon
parentc8490be2a717467c61381245e0fa2793a48c57ae (diff)
downloadmastodon.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.py2
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)
Powered by cgit v1.2.3 (git 2.41.0)