liunx命令之telnet和curl

curl 命令:(和 postman 请求是一个道理,只不过这个是用于 liunx 服务器直接请求的命令)

curl -l -H "Content-type: application/json" -X POST -d '入参' 请求 url
例如:curl -l -H "Content-type: application/json" -X POST -d '{"name":"zs"}' https://localhost:8080/api/getName

 

验证端口是否开通(有没有权限)

telnet ip 端口