server启动之后,填入callback
This commit is contained in:
@@ -39,6 +39,22 @@ def revoke_msg():
|
||||
|
||||
print(response.text)
|
||||
|
||||
def set_call_back():
|
||||
|
||||
url = "/tools/setCallback"
|
||||
|
||||
payload = json.dumps({
|
||||
"token": "cb43f52db27e4a56bb6ec7da54373582",
|
||||
"callbackUrl": "http://192.168.2.210:8999/gewechat/message/callback"
|
||||
})
|
||||
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__':
|
||||
get_chatroom_members()
|
||||
set_call_back()
|
||||
|
||||
17
gewechat/client/set_call_back.py
Normal file
17
gewechat/client/set_call_back.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
url = "/tools/setCallback"
|
||||
|
||||
payload = json.dumps({
|
||||
"token": "{{gewe-token}}",
|
||||
"callbackUrl": "http://www.baidu.com"
|
||||
})
|
||||
headers = {
|
||||
'X-GEWE-TOKEN': '{{gewe-token}}',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
response = requests.request("POST", url, headers=headers, data=payload)
|
||||
|
||||
print(response.text)
|
||||
Reference in New Issue
Block a user