From 71d1038b323a5c949c4480a552a77855b5a1f5c3 Mon Sep 17 00:00:00 2001 From: lambadalambda Date: Fri, 8 Sep 2017 07:45:23 +0200 Subject: 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. --- mastodon/Mastodon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: response_object = None try: if method == 'GET': - response_object = requests.get(self.api_base_url + endpoint, data = params, headers = headers, files = files, timeout = self.request_timeout) + response_object = requests.get(self.api_base_url + endpoint, params = params, headers = headers, files = files, timeout = self.request_timeout) if method == 'POST': response_object = requests.post(self.api_base_url + endpoint, data = params, headers = headers, files = files, timeout = self.request_timeout) -- cgit v1.2.3