630| 2
|
[求助问答] 如何在Python模式中使用云变量 |
![]() |
回复本帖可获得 2 创造力奖励! 每人限 2 次 |
import requests API_URL = "https://api.example.com/variables" HEADERS = {"Authorization": "Bearer YOUR_TOKEN"} response = requests.post( API_URL, json={"name": "weather", "value": "sunny"}, headers=HEADERS ) # 获取变量 response = requests.get(f"{API_URL}/weather", headers=HEADERS) value = response.json()["value"] print("天气:", value) |
© 2013-2025 Comsenz Inc. Powered by Discuz! X3.4 Licensed