Adding JSON encoded documents

Using the example from the Elastic Search Tutorial: $ curl -XPOST ‘http://localhost:5000/index/blog/post/1’ -d ‘ { “user”: “dilbert”, “postDate”: “2011-12-15”, “body”: “Search is hard. Search should be easy.” , “title”: “On search” }’ -H ‘Content-Type: application/json’ Just add the -H option to explicitly pass the content type as an HTTP header.