Curl for sending data
curl http://localhost:8080/user/2501
API : http://localhost:8080/user/:id
POST Data
curl -X POST -H "Content-Type: application/json" -d '{"name":"Harish","gender":"male","age":32}' http://localhost:8080/user
where:
-X
is short for --request
= type of request
Specifies the custom request method to use in communicating with server
-H
is short for --header
= Adding Header field
-d
is short for --data
= String data
Delete User
curl -X DELETE -H "Content-Type: application/json" http://localhost:8080/user/3