@ wrote... (5 years, 8 months ago)

The curl manpage isn't super clear on this, but to read from stdin you need to prepend the dash with a @.

json_producer | curl -d @- -H 'Content-Type: application/json' http://example.com/json_consumer
Category: tech, Tags: linux, shell
Comments: 0
Click here to add a comment