curl介绍
curl是一个利用URL语法在命令行下工作的文件传输工具,支持文件上传和下载,用来请求 Web 服务器。curl支持的通信协议有ftp、ftps、http、https、tftp、pop3、scp等。
也可以使用postman进行前后端接口联调测试。postman官网下载地址:https://www.getpostman.com/
postman使用说明:https://blog.csdn.net/fxbin123/article/details/80428216
curl使用
get请求:【curl http://192.168.***.**:8080/login?数据】
图中post请求参数解释如下:
-H
参数添加 HTTP 请求的标头为Content-Type:application/json
-X
参数指定 HTTP 请求的方法为POST
--data(或者-d)参数用于发送 POST 请求的数据体
curl详细介绍参见阮一峰网站:http://www.ruanyifeng.com/blog/2019/09/curl-reference.html