命令提示符下的curl无法解析localhost
我试图通过curl运行一些弹性命令 在命令提示下,键入时:命令提示符下的curl无法解析localhost,curl,elasticsearch,Curl,elasticsearch,我试图通过curl运行一些弹性命令 在命令提示下,键入时: curl www.google.com:效果很好 curl localhost:9200:弹性搜索托管在这里,工作正常 但是,命令: curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary "@accounts.json"` 给我错误:无法解析主机:'localhost 下面是快照 有人能建议我如何纠正这个问题吗?或者如果我可以使
:效果很好curl www.google.com
:弹性搜索托管在这里,工作正常curl localhost:9200
curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary "@accounts.json"`
给我错误:无法解析主机:'localhost
下面是快照
有人能建议我如何纠正这个问题吗?或者如果我可以使用postman或其他http客户端运行此命令?试试:
curl-XPOST'http://localhost:9200/bank/account/_bulk?pretty'--数据二进制
指定协议并更改引号:
curl -XPOST "http://localhost:9200/bank/account/_bulk?pretty" --data-binary "@accounts.json"
尝试使用双引号代替。例如:
curl -XGET "localhost:9200/_cat/indices?v&pretty"
太好了,我只需要更改我的报价。为什么双引号有效而单引号无效?