diff --git a/platypush/plugins/http/request/__init__.py b/platypush/plugins/http/request/__init__.py index b9bc0f59..eb8addc6 100644 --- a/platypush/plugins/http/request/__init__.py +++ b/platypush/plugins/http/request/__init__.py @@ -46,6 +46,9 @@ class HttpRequestPlugin(Plugin): def _exec(self, method, url, output='text', **kwargs): """ Available output types: text (default), json, binary """ + if 'username' in kwargs and 'password' in kwargs: + kwargs['auth'] = (kwargs.pop('username'), kwargs.pop('password')) + method = getattr(requests, method) response = method(url, **kwargs) response.raise_for_status()