Elasticsearch Incorrect http method for uri for POST
This is because you're trying to POST to an index. Add a document type to the end of your url ex. /my_index/my_doc and you should be able to POST your document as my_doc document type.
to anyone come to this answer looking for a solution, the Elastic search
has been changed now index type is not supported since ES6
and above what you need to do is
POST -> https://youripOrDomain:9200/your_index_name/_doc/your_id
if you leave your_id
blank it will create one for you so it is optional