Curl post command issue



curl -H ‘Content-Type:  application/x-ndjson’ -XPOST ‘localhost:9200/bank/account/_bulk?pretty’ –data-binary @accounts.json

Working: (remove the space after “Content-Type:”)

http not support error

curl -H ‘Content-Type: application/x-ndjson’ -XPOST ‘localhost:9200/bank/account/_bulk?pretty’ –data-binary @accounts.json

correct syntax for windows  (change single quote to double quote)

curl -H ‘Content-Type:application/x-ndjson’ -XPOST ‘http://localhost:9200/bank/account/_bulk?pretty’ –data-binary @C:\BDS\KibanaData\accounts.json


curl -H “Content-Type:application/x-ndjson” -XPOST “http://localhost:9200/bank/account/_bulk?pretty” –data-binary @C:\BDS\KibanaData\accounts.json

and it works!



How to run Confluent from Windows

  1. Start ZooKeeper Server. From confluent-3.0.1\bin\windows directory run below command. zookeeper-server-start.bat ..\..\etc\kafka\
  2. Start Kafka Server. kafka-server-start.bat ..\..\etc\kafka\
  3. Start Schema Registry: schema-registry-start.bat ..\..\etc\schema-registry\
  4. Start producer. kafka-console-producer.bat –broker-list localhost:9092 –topic text.test
  5. Start Consumer. kafka-console-consumer.bat –topic text.test –from-beginning –zookeeper localhost:2181
  6. Then start pumping messages from producer and you should receive it on consumer.