调整代码
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user