例子:
curl --location 'http://110.0.0.1:1024' \
--header 'Content-Type: application/json' \
--data '{"task_id": 1
}'
方式一:postman可视化图形调用
方式二:Vscode中powershell发送请求
#powershell (psh)
Invoke-WebRequest -Uri 'http://110.0.0.1:1024' -Method 'POST' -Headers @{'Content-Type'='application/json'} -Body '{"task_id":1}'
方式三:Vscode中cmd发送请求
#cmd中
cmd /c curl --location "http://110.0.0.1:1024" -H "Content-Type: application/json" --data "{\"task_id\":1}"