SoftTesting/第六周/作业四.py
2025-04-01 09:52:45 +08:00

21 lines
469 B
Python

import requests
import 作业三
body = {
"name": "测试开发提升课01",
"subject": "6",
"price": 899,
"applicablePerson": "2",
"info": "测试开发提升课01"
}
headers = {
'Authorization': 作业三.data['token']
}
add = requests.post('http://kdtx-test.itheima.net/api/clues/course',
json=body,
cookies=作业三.cookie,
headers=headers
)
print(add.text)