Hugo<![CDATA[test on Decaf Blog]]> 2024-04-12T20:16:03+00:00 https://blog.decaf200.com/tags/test/ <![CDATA[Useful Curl commands]]> https://blog.decaf200.com/posts/curl-commands/ 2021-10-13T00:00:00+00:00 2021-10-13T00:00:00+00:00 Useful CURL commands with examples

Send Post request:

curl --data "key1=value1&key2=value2" http://site.com

Send JSON data:

curl  -H 'Content-Type: application/json' --data '{"param1":"test1","param2":"test2"}' http://test.com

Get status code:

curl -s -o /dev/null -w "%{http_code}" http://www.example.org/
]]>