import requests
def check_api_status(api_url):
try:
response = requests.get(api_url)
if response.status_code == 200:
print(f"接口 {api_url} 正常")
else:
print(f"接口 {api_url} 异常,状态码: {response.status_code}")
except requests.exceptions.RequestException as e:
print(f"接口 {api_url} 异常,错误: {e}")
if __name__ == '__main__':
api_urls = ['http://1.94.56.68:7511/index/#/application/attendance/AttendanceSetting']
for url in api_urls:
check_api_status(url)
07-21
184
12-24
07-25
4078