Elasticsearch curl: (7) couldn't connect to host
On my Mac OS X, I use 127.0.0.1:9200/
instead of http://localhost:9200/
cause I had the same problem.
I think that when you use the command the terminal replaces the localhost by it's IPv6 address and I'm not sure that curl supports that.
Please check and let me know.