简体   繁体   中英

curl - looking to test some Rest APIs - what is the syntax to Post xml to a rest api with basic authentication?

curl-希望测试一些Rest API-使用基本身份验证将xml发布到rest api的语法是什么?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM