更新功能和文档: 增强支付系统、任务队列管理、用户作品管理等功能
This commit is contained in:
15
demo/test_api.py
Normal file
15
demo/test_api.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import requests
|
||||
|
||||
# 测试作品列表API
|
||||
url = "http://localhost:8080/api/works/my-works"
|
||||
headers = {
|
||||
"Authorization": "Bearer eyJhbGciOiJIUzUxMiJ9.eyJyb2xlIjoiUk9MRV9VU0VSIiwidXNlcklkIjoxLCJ1c2VybmFtZSI6ImFkbWluIiwic3ViIjoiYWRtaW4iLCJpYXQiOjE3NjE2MzYyNDQsImV4cCI6MTc2MTcyMjY0NH0.qZxHDkgSoSRvmMHBFfRdzZYtC55eCKba3VN07lTsFzKXn1hYbupv7boBJDKNOUrRYaH5ougHLFTI5xm059434g"
|
||||
}
|
||||
|
||||
try:
|
||||
response = requests.get(url, headers=headers, params={"page": 0, "size": 10})
|
||||
print(f"Status Code: {response.status_code}")
|
||||
print(f"Response: {response.text}")
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
|
||||
Reference in New Issue
Block a user