Issue
I am trying to run some elastic commands through curl.
On command prompt, when I type:
curl www.google.com
: it works finecurl localhost:9200
: elastic search hosted here, works fine
But, the command:
curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary "@accounts.json"`
Gives me error: Could not resolve host: 'localhost
Can someone suggest me how to correct this? Or if somehow I can use postman or some other http client to run this command?
Solution
Try:
curl -XPOST 'http://localhost:9200/bank/account/_bulk?pretty' --data-binary
Answered By - IvRRimUm