Post JSON #
curl --json '{"title":"Weekly sync","minutes":30}' https://api.example.com/meetings
curl --json @payload.json https://api.example.com/meetings
jq -n '{title: "Retro"}' | curl --json @- https://api.example.com/meetings
--json posts the data and sets both Content-Type and Accept to application/json; it does not validate the JSON. See building JSON with jq.
Query strings #
curl -G -d 'q=tide tables' -d 'page=2' https://search.example.org/
curl --url-query 'city=Köln' https://weather.example.com/now
-G turns data options into a GET with a ? query; --url-query encodes like --data-urlencode.