python request 实现以下功能 curl -X POST -H "Content-Type: application/json" -d ''
时间: 2023-04-09 16:04:20 浏览: 227
python读写json文件的简单实现
import requests
url = "http://example.com/api"
headers = {"Content-Type": "application/json"}
data = {}
response = requests.post(url, headers=headers, json=data)
print(response.text)
阅读全文