Please take your time to properly write up your problem. Just copy pasting a code snippet is pretty useless if you do not explain what error you are received, what outcome you would have been expected, what elasticsearchversion you are testing against, how the same requests looks via curl or the dev-tools.
Creating a proper issue/writeup requires some time, but will increase your chances of getting a reply a lot.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.