You could use wget as well:
wget -O- --post-data="{"some data to post..."}" \
--header="Content-Type:application/json" \
'http://www.example.com:9000/json'
Calling wget
with the option -O
providing the -
(space in between will be ignored, so it could also be written as -O -
) to it as its value will cause wget
to output the HTTP response directly to standard output instead into a file. The long option name for that is --output-document=file
.