Kamixitong/test_curl.py

16 lines
300 B
Python
Raw Normal View History

2025-11-11 21:39:12 +08:00
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
# 简单测试登录
response = requests.post(
"http://127.0.0.1:5000/login",
data={
"username": "admin",
"password": "admin123"
}
)
print(f"状态码: {response.status_code}")
print(f"URL: {response.url}")