-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtest.py
More file actions
18 lines (13 loc) · 780 Bytes
/
test.py
File metadata and controls
18 lines (13 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 客户端正确使用 POST 方法
import requests
secret_key = "gduifgashjb8t3961jhgsdghf"
response = requests.post("http://127.0.0.1:5000/list_tool", json={"server_name": "weather","secret_key":secret_key})
print(response.text)
response = requests.post("http://127.0.0.1:5000/call_tool", json={"server_name": "weather","tool_name":"get_alerts","args":{"state":"CA"},"secret_key":secret_key})
print(response.text)
response = requests.post("http://127.0.0.1:5000/list_server",json={"secret_key":secret_key})
print(response.text)
response = requests.post("http://127.0.0.1:5000/list_files",json={"secret_key":secret_key})
print(response.text)
response = requests.post(f"http://127.0.0.1:5000/get_download_link/{secret_key}/武士.png")
print(response.text)