1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| import requests import json
with open('你的公钥文件路径', 'r') as cert_file: cert = cert_file.read().strip()
with open('你的私钥文件路径', 'r') as key_file: key = key_file.read().strip()
apikey = "你的雨云key"
headers = { 'x-api-key': apikey, 'Content-Type': 'application/json', }
data = json.dumps({ 'cert': cert, 'key': key, })
response = requests.put('https://api.v2.rainyun.com/product/sslcenter/9280', headers=headers, data=data)
print(response.text)
|