Reputation: 3492
curl - looking to test some Rest APIs - what is the syntax to Post xml to a rest api with basic authentication?
Upvotes: 0
Views: 2497
Reputation: 142044
This works for me.
curl -i POST -u "user:password" -H "Content-Type: application/xml" -d "<Foo></Foo>" http://example.org/resource
http://curl.haxx.se/docs/manpage.html
Upvotes: 0