curl命令简写client url 客户端的统一资源定位符,主要用于向服务器发送请求。
1.发送get请求
curl http://localhost:3000/users/getUsers
2.发送post请求
curl -d 'name=asd&age=99' http://localhost:3000/users/addUser
3.发送put请求
curl -d 'name=asd&age=99' http://localhost:3000/users/updateUser
4.发送delete请求
curl -d 'name=asd' http://localhost:3000/users/deleteUser
-d指令代表发送请求时携带的参数。