From 6508ef29a1585550363e9a06b089a568847c41fa Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 18 Jul 2018 20:23:11 +0200 Subject: [PATCH] Don't overwrite the output variable --- platypush/plugins/http/request/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platypush/plugins/http/request/__init__.py b/platypush/plugins/http/request/__init__.py index ce32a2bad0..8003de8e5b 100644 --- a/platypush/plugins/http/request/__init__.py +++ b/platypush/plugins/http/request/__init__.py @@ -48,10 +48,11 @@ class HttpRequestPlugin(Plugin): method = getattr(requests, method) response = method(url, **kwargs) response.raise_for_status() - output = response.text if output == 'json': output = response.json() if output == 'binary': output = response.content + else: output = response.text + return output