DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Post XML Using Curl
You can use curl on the command line to do a POST to an endpoint.
echo '<doc><item>Some content.</item></doc>' | curl -X POST -H 'Content-type: text/xml' -d @- http://example.com/restapi
This is handy for adding web services to applications that do not do web services but can do command lines--FileMaker for example.




