调整代码

This commit is contained in:
liuwei
2025-04-23 16:11:06 +08:00
parent b919a3834e
commit fc757151e4
11 changed files with 345 additions and 214 deletions

View File

@@ -56,5 +56,24 @@ def set_call_back():
print(response.text)
def send_file():
url = "/message/postFile"
payload = json.dumps({
"appId": app_id,
"toWxid": "52418238895@chatroom",
"fileName": "favicon.ico",
"fileUrl": "http://192.168.2.210:8888/static/favicon.ico"
})
headers = {
'X-GEWE-TOKEN': 'cb43f52db27e4a56bb6ec7da54373582',
'Content-Type': 'application/json'
}
response = requests.request("POST", base_url+url, headers=headers, data=payload)
print(response.text)
if __name__ == '__main__':
set_call_back()
send_file()