You have to install the curl
binary in your PC first. You can download it from here.
After that unzip it into a folder. Lets say C:\curl
. In that folder you’ll find curl.exe
file with several .dll
files.
Now open a command prompt by typing cmd
from the start menu
. And type cd c:\curl
on there and it will take you to the curl folder. Now execute the curl
command that you have.
One thing, windows doesn’t support single quote around around the fields. So you have to use double quotes. For example I have converted your curl command like appropriate one.
curl -H "Content-Type: application/json" -XPOST "http://localhost:9200/indexname/typename/optionalUniqueId" -d "{ \"field\" : \"value\"}"