老
python中调用小程序云函数怎么写?我是新手,在python中调用云函数不知道该怎么写了,以下写法总是提示:{'errcode': 47001, 'errmsg': 'data format error hint: [SghAjOLoRa-1nrTba] rid: 602a08c8-3fda1ad8-1be258a2'},请给我一段调用云函数的例程吧,急用,谢谢 #python调用云函数修改数据库 url = '{0}tcb/databaseupdate?access_token={1}'.format(self.WECHAT_URL, accessToken) POSTBODY = "{db:'filelist',condition:{workName: '办公室',download: {false}},type:'update',data:{signOrN:{true},download: {false}}}" data = { "env": self.ENV, "name": "database", "POSTBODY":POSTBODY } print("更新云数据:",data) response = requests.post(url, data=json.dumps(data)) result = response.json() print(result) #将返回值打印
2023-05-15