# Error: Curl with Elasticsearch 6

**URL:** https://discuss.elastic.co/t/error-curl-with-elasticsearch-6/144620
**Category:** Elasticsearch
**Created:** [August 16, 2018, 5:10am UTC](https://discuss.elastic.co/t/error-curl-with-elasticsearch-6/144620 "2018-08-16T05:10:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ebolanos137](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@ebolanos137](https://discuss.elastic.co/u/ebolanos137)
#### Post date: [August 16, 2018, 5:10am UTC](https://discuss.elastic.co/t/error-curl-with-elasticsearch-6/144620/1 "2018-08-16T05:10:33Z")

</div>

I'm trying to do

curl -X PUT -d @'/home/cuckoo/.cuckoo/elasticsearch/template.json' '[http://localhost:9200/\_template/cuckoo](http://localhost:9200/_template/cuckoo)'

but, I have this error:

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

Can you help me, please.

Regards  
EBO

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [August 16, 2018, 5:20am UTC](https://discuss.elastic.co/t/error-curl-with-elasticsearch-6/144620/2 "2018-08-16T05:20:32Z")

</div>

I think you need to include this in your curl [https://www.elastic.co/guide/en/elasticsearch/reference/6.3/common-options.html#\_content\_type\_requirements](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/common-options.html#_content_type_requirements)

---

<div class="post-metadata">

### Author: ![ebolanos137](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@ebolanos137](https://discuss.elastic.co/u/ebolanos137)
#### Post date: [August 16, 2018, 5:53am UTC](https://discuss.elastic.co/t/error-curl-with-elasticsearch-6/144620/3 "2018-08-16T05:53:58Z")

</div>

Thanks for your answer; but, what would be the correct way to include it?

---

<div class="post-metadata">

### Author: ![ebolanos137](https://avatars.discourse-cdn.com/v4/letter/e/5fc32e/32.png) [@ebolanos137](https://discuss.elastic.co/u/ebolanos137)
#### Post date: [August 16, 2018, 8:36pm UTC](https://discuss.elastic.co/t/error-curl-with-elasticsearch-6/144620/4 "2018-08-16T20:36:05Z")

</div>

Any idea?

---

<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: [August 16, 2018, 8:47pm UTC](https://discuss.elastic.co/t/error-curl-with-elasticsearch-6/144620/5 "2018-08-16T20:47:35Z")

</div>

A lot of the examples in the docs allow you to copy them as valid curl commands, so you could look there.

---

<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: [September 13, 2018, 8:47pm UTC](https://discuss.elastic.co/t/error-curl-with-elasticsearch-6/144620/6 "2018-09-13T20:47:36Z")

</div>

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