用python写一段代码,调用api,api的地址是aaaa
时间: 2023-03-09 22:32:01 浏览: 107
以下是一段用Python调用API的示例代码:import requests
url = 'aaaa'
response = requests.get(url)
if response.status_code == 200:
print(response.json())
相关问题
写一段调用API的Python代码
import requests
url = 'http://api.example.com/get-data'
response = requests.get(url)
print(response.text)
阅读全文