From b17af7a9e0508a59113fb14bf91ed4c885f24e0f Mon Sep 17 00:00:00 2001 From: hugy <504650082@qq.com> Date: Tue, 8 Aug 2023 17:44:49 +0800 Subject: [PATCH] doc: client --- python/3.9.5.81/http_client.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/python/3.9.5.81/http_client.py b/python/3.9.5.81/http_client.py index 6415d23..d7e63f7 100644 --- a/python/3.9.5.81/http_client.py +++ b/python/3.9.5.81/http_client.py @@ -361,6 +361,40 @@ def addFavFromImage(): print(response.text) +def getContactProfile(): + print("modify wxid ") + raise RuntimeError("modify wxid then deleted me") + url = "127.0.0.1:19088/api/getContactProfile" + + payload = json.dumps({ + "wxid": "" + }) + headers = { + 'Content-Type': 'application/json' + } + + response = requests.request("POST", url, headers=headers, data=payload) + print(response.text) + + +def sendAtText(): + print("modify wxids chatRoomId") + raise RuntimeError("modify wxids chatRoomId then deleted me") + url = "127.0.0.1:19088/api/sendAtText" + + payload = json.dumps({ + "wxids": "notify@all", + "chatRoomId": "123@chatroom", + "msg": "你好啊" + }) + headers = { + 'Content-Type': 'application/json' + } + + response = requests.request("POST", url, headers=headers, data=payload) + + print(response.text) + if __name__ == '__main__': checkLogin()