import json import requests import base64 payload = {'data': {"cmd": "enable", "name": "wpsPlugin", "url": "http://172.10.3.110:3000/", "addonType": "wps", "online": "true"}, 'serverId': '524ef80e-7ccd-43af-9fcb-69f3b0269730'} payload['data'] = base64.b64encode(json.dumps(payload['data']).encode('utf-8')).decode('utf-8') headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36', 'content-type': 'text/plain;charset=UTF-8' } resp = requests.post('http://localhost:58890/deployaddons/runParams', data=json.dumps(payload), headers=headers) # print(resp.text)