我的目标是使用 cygwin/curl 将 CouchDB 文档从我的 Windows 计算机上传到远程服务器。
以下教程展示了如何在 Mac 上执行相同操作:http://net.tutsplus.com/tutorials/getting-started-with-couchdb/ http://net.tutsplus.com/tutorials/getting-started-with-couchdb/
卷曲-X POSThttp://127.0.0.1:5984/mycouchshop/ http://127.0.0.1:5984/mycouchshop/-d @person.json -H "内容类型:application/json
我怎样才能对 Windows 和 CygWin 执行同样的操作?
打开cygwin后。
step 1- CD 进入包含您要通过 CURL 发布的文件的目录:
cd ../
cd /cygdrive/c/Users/[put user name here]/Documents/[more directories here]/
注意:奇怪的部分是必须浏览“cygdrive”目录。
step 2- 使用CURL发送文件:
curl -X POST http://mywebsite.com/path/to/directory http://mywebsite.com/path/to/directory -d @some_file.extension -H "Content-Type: application/json"
将“mywebsite.com...”、“some_file.extension”和“application/json”替换为实际值。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)