健康检查
curl --request GET \
--url http://localhost:8000/health \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/health"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/health', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "ok"
}服务与应用
健康检查
检查服务是否可响应,成功返回 status 为 ok
GET
/
health
健康检查
curl --request GET \
--url http://localhost:8000/health \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:8000/health"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:8000/health', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "ok"
}最后修改于 2026年9月19日