Monday, May 14, 2012

CURL Post a file in json format

I keep having to look this up, so putting it here ought to save some time. When attempting to post a block of JSON to a web service the Curl incantation is :


 curl -X POST  -H 'content-type: application/json'  -d @myjsonfile.txt http://some.url/param

2 comments:

ajudan pk said...
This comment has been removed by a blog administrator.
Guruji said...
This comment has been removed by a blog administrator.