原文

windows环境下curl报错:Protocol “'http” not supported or disabled in libcurl

原因:window命令行不支持单括号引用
解决方案:将单括号删除

例如:curl ‘http://localhost:9200/?pretty’
在window命令行应改为:curl http://localhost:9200/?pretty

原始解决方案来源:https://stackoverflow.com/questions/6684235/perl-curl-1-protocol-http-not-supported-or-disabled-in-libcurl

curl在windows上使用的注意事项:
curl -XPOST http://localhost:9200/video/md/1 -d “{
“tvId\”:\”1001\”,\”name\”:\”test\”,\”order\”:1}” -d 内的参数需要用双引号包起来,数据中的双引号需要转义

在学习操作elasticSearch时在windows用curl,参考:http://www.cnblogs.com/Fred1987/p/6020145.html

Reference

  • https://blog.csdn.net/zwqlxx/article/details/77684612

写在最后

欢迎大家关注鄙人的公众号【麦田里的守望者zhg】,让我们一起成长,谢谢。
微信公众号

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐