send post request via curl

علی ذوالفقار
1399/06/03 07:22:19 (689)
simple post : 
curl -X POST https://example.com/

post data : (Content-Type: application/x-www-form-urlencoded)
curl -d "user=user1&pass=abcd" -X POST https://example.com/login.php

post json : 
curl -d '{json}' -H 'Content-Type: application/json' https://example.com/login.php

post file : 
curl --form "fileupload=@my-file.txt" https://example.com/uploadFile.php

Back