Use cURL in Windows to send UTF8 JSON data in ElasticSearch

By xngo on February 21, 2019

curl -X PUT "http://localhost:9200/movies/movie/11" --data "@the.grand.canal.txt"

The the.grand.canal.txt file looks like the following:

{
    "title": "大運河",
    "year": 1987,
    "genres": ["Adventure", "Drama"],
    "actors": ["Bobby Au Yeung Chun Wah", "蘭陵公主", "Tony Leung Chiu Wai"]
}

Reference

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.