xxxxxxxxxx
curl -X POST -d "param1=value1¶m2=value2" https://example.com/post
xxxxxxxxxx
curl -X POST -H "Content-Type: application/json" \
-d '{"username":"abc","password":"abc"}' \
https://api.example.com/v2/login
xxxxxxxxxx
curl -d "user=user1&pass=abcd" -X POST https://example.com/login
xxxxxxxxxx
# dont forget the content type, else it will throw an error
curl -X POST -H "Content-Type: application/json" \
-d '{"username":"abc","password":"abc"}' \
https://api.example.com/v2/login
xxxxxxxxxx
RUN IN WARP
curl -H 'Content-Type: application/json' \
-d '{ "title":"foo","body":"bar", "id": 1}' \
-X POST \
https://example.com/posts
xxxxxxxxxx
curl --data '' https://example.com/resource.cgi
curl -X POST https://example.com/resource.cgi
curl --request POST https://example.com/resource.cgi
xxxxxxxxxx
curl-X POST http://localhost:8080/api/guests -H 'Content-Type: application/json' -d '{"lastName":"Zithi", "firstName":"Ans"}'
-H header content
-d json payload/data
xxxxxxxxxx
curl -H "Content-Type: application/json" -d "@data.json" -X POST http://localhost:3000/data