如何在Windows下使用curl发布PUT请求? [英] How to post PUT request under the Windows using curl?
本文介绍了如何在Windows下使用curl发布PUT请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在Windows下使用PUT请求通过curl.exe发布XML数据。
I need to post XML data via curl.exe under windows using PUT request.
在curl帮助中找到:
In the curl help I found:
-d / - data< data> HTTP POST数据(H)
-d/--data <data> HTTP POST data (H)
我应该为< data> ?
What should I supply for <data> ?
推荐答案
curl示例调用
# with inlining plain data
curl -X PUT -d "payload" http://localhost
# referrring file
curl -X PUT -d @myXmlFile.xml http://localhost
如果您的Windows curl-port不支持它, =http://www.cygwin.com/ =noreferrer> cygwin 。它是一个类Linux环境的窗口,还提供了适当的卷曲。
If your windows curl-port does not support it go for cygwin. It is a linux-like environment for windows and also offers "a proper" curl.
这篇关于如何在Windows下使用curl发布PUT请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文