20 lines
431 B
Python
20 lines
431 B
Python
|
|
import requests
|
||
|
|
|
||
|
|
url = "http://192.168.1.141:30100/api/user/mobilelogin"
|
||
|
|
data = {
|
||
|
|
"mobile": "13800138000",
|
||
|
|
"captcha": "223344",
|
||
|
|
"password": "123456"
|
||
|
|
}
|
||
|
|
|
||
|
|
print(f"测试接口: {url}")
|
||
|
|
print(f"请求数据: {data}")
|
||
|
|
print()
|
||
|
|
|
||
|
|
try:
|
||
|
|
response = requests.post(url, data=data, timeout=10)
|
||
|
|
print(f"状态码: {response.status_code}")
|
||
|
|
print(f"响应: {response.text}")
|
||
|
|
except Exception as e:
|
||
|
|
print(f"错误: {e}")
|