curl to connect secured elasticsearch

How to connect secured Elasticsearch using curl command?

curl –key /opt/mohan/mypack/my_host_name.key –capath /opt/mohan/mypack/ –cacert   /opt/mohan/mypack/mycacert.pem –cert  /opt/mohan/mypack/mycert.crt https://localhost:9200/_cat/indices/?v

Advertisements