diff --git a/platypush/plugins/http/request/__init__.py b/platypush/plugins/http/request/__init__.py index 8003de8e..b9bc0f59 100644 --- a/platypush/plugins/http/request/__init__.py +++ b/platypush/plugins/http/request/__init__.py @@ -1,5 +1,6 @@ import requests +from platypush.message import Message from platypush.plugins import Plugin, action class HttpRequestPlugin(Plugin): @@ -53,6 +54,12 @@ class HttpRequestPlugin(Plugin): if output == 'binary': output = response.content else: output = response.text + try: + # If the response is a Platypush JSON, extract it + output = Message.build(output) + except Exception as e: + pass + return output