# ES is giving error

**URL:** <https://discuss.elastic.co/t/es-is-giving-error/153716>\
**Category:** Elasticsearch\
**Created:** [October 24, 2018, 5:40am UTC](https://discuss.elastic.co/t/es-is-giving-error/153716 "2018-10-24T05:40:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gobinda\_Nandi1](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@Gobinda\_Nandi1](https://discuss.elastic.co/u/Gobinda_Nandi1)\
**Post date:** [October 24, 2018, 5:40am UTC](https://discuss.elastic.co/t/es-is-giving-error/153716/1 "2018-10-24T05:40:10Z")

</div>

```
curl -XPOST "http://localhost:9200/myindex/tweet/" -d'
{
    "content": "Hello World!",
    "postDate": "2009-11-15T14:12:12"
}'

{"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}

```

using ES 6, ubuntu 16.04

anyone can point the error i doing ?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 24, 2018, 5:42am UTC](https://discuss.elastic.co/t/es-is-giving-error/153716/2 "2018-10-24T05:42:18Z")

</div>

You will need to set the correct content type as outlined in [this blog post](https://www.elastic.co/blog/strict-content-type-checking-for-elasticsearch-rest-requests).

---

<div class="post-metadata">

**Author:** ![Gobinda\_Nandi1](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@Gobinda\_Nandi1](https://discuss.elastic.co/u/Gobinda_Nandi1)\
**Post date:** [October 26, 2018, 7:17am UTC](https://discuss.elastic.co/t/es-is-giving-error/153716/3 "2018-10-26T07:17:04Z")

</div>

thanks for the help. appreciate it.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 23, 2018, 7:17am UTC](https://discuss.elastic.co/t/es-is-giving-error/153716/4 "2018-11-23T07:17:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
