Files
ai_dianshang/test-backend.bat
2025-11-28 15:18:10 +08:00

32 lines
825 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 > nul
echo ======================================
echo 测试后端服务连通性
echo ======================================
echo.
echo [1] 测试健康检查接口...
curl -v http://104.244.91.212:8060/health
echo.
echo.
echo [2] 测试 API 接口(无认证)...
curl -v http://104.244.91.212:8060/api/v1/banners
echo.
echo.
echo [3] 测试 CORS 预检请求...
curl -v -X OPTIONS http://104.244.91.212:8060/api/v1/cart ^
-H "Origin: https://gvizee.com" ^
-H "Access-Control-Request-Method: GET" ^
-H "Access-Control-Request-Headers: authorization,content-type"
echo.
echo.
echo [4] 测试购物车接口(带 Token...
echo 请手动替换下面的 YOUR_TOKEN 为实际的 token
echo curl -v http://104.244.91.212:8060/api/v1/cart -H "Authorization: Bearer YOUR_TOKEN"
echo.
pause