+ 实现基础 web 服务,提供 /ping、/list、/stop 路由

This commit is contained in:
2024-07-03 23:39:17 +08:00
parent a5688e3426
commit 245fba4ed0
7 changed files with 422 additions and 0 deletions

34
src/main.http Normal file
View File

@@ -0,0 +1,34 @@
@url=http://localhost:12340
@accept=Accept: application/json
@content-type=Content-Type: application/json
###
GET {{url}}/ping
{{accept}}
###
GET {{url}}/list
{{accept}}
###
GET {{url}}/list?name=notepad
{{accept}}
###
GET {{url}}/listps
{{accept}}
###
GET {{url}}/listps?name=Notepad
{{accept}}
###
POST {{url}}/stop
{{accept}}
{{content-type}}
{
"Id": 4900,
"ProcessName": "Taskmgr"
}