Files
tyapi-server/test_article_simple.bat
2025-09-01 18:29:59 +08:00

31 lines
800 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
REM 文章系统API简单测试脚本
REM 使用方法: test_article_simple.bat
set BASE_URL=http://localhost:8080/api/v1
echo === 文章系统API测试 ===
echo.
REM 测试1: 获取文章列表
echo 1. 测试获取文章列表...
curl -s -X GET "%BASE_URL%/articles?page=1&page_size=5" -H "Content-Type: application/json"
echo.
echo.
REM 测试2: 获取文章统计
echo 2. 测试获取文章统计...
curl -s -X GET "%BASE_URL%/articles/stats" -H "Content-Type: application/json"
echo.
echo.
REM 测试3: 搜索文章
echo 3. 测试搜索文章...
curl -s -X GET "%BASE_URL%/articles/search?keyword=技术&page=1&page_size=5" -H "Content-Type: application/json"
echo.
echo.
echo === 测试完成 ===
echo 注意: 需要认证的接口需要JWT token请先登录获取token
pause