added client api request crafting script

This commit is contained in:
Kevin Froman 2020-08-08 15:40:20 -05:00
parent 6976dcf8f3
commit 5e00bb930f
2 changed files with 39 additions and 1 deletions

View file

@ -67,7 +67,7 @@ def local_command(command, data='', silent=True, post=False,
if not hostname:
return False
if data != '':
if data:
data = '&data=' + urllib.parse.quote_plus(data)
payload = 'http://%s/%s%s' % (hostname, command, data)
if not config.get('client.webpassword'):