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 fineBut, the command:
curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary "@accounts.json"`
Gives me error: Could not resolve host: 'localhost
Below is snapshot.
Can someone suggest me how to correct this? Or if somehow I can use postman or some other http client to run this command?
Specify the protocol and change the quotes:
curl -XPOST "http://localhost:9200/bank/account/_bulk?pretty" --data-binary "@accounts.json"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With