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 -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 -H "Content-Type: application/json" -d "@data.json" -X POST http://localhost:3000/data
xxxxxxxxxx
curl -X POST -i -H "Content-type: application/json" -X POST http://mafreebox.freebox.fr/api/v1/login/authorize/ -d '
{
"app_id": "fr.prestaopen.cacti",
"app_name": "Cacti_request",
"app_version": "0.1",
"device_name": "Eon_Master"
} ' >/tmp/post_authorize.log 2>/dev/null