# X-www-urlencoded not supported(?)

**URL:** <https://discuss.elastic.co/t/x-www-urlencoded-not-supported/108128>\
**Category:** Elasticsearch\
**Created:** [November 17, 2017, 12:41pm UTC](https://discuss.elastic.co/t/x-www-urlencoded-not-supported/108128 "2017-11-17T12:41:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sancroth](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sancroth](https://discuss.elastic.co/u/sancroth)\
**Post date:** [November 17, 2017, 12:41pm UTC](https://discuss.elastic.co/t/x-www-urlencoded-not-supported/108128/1 "2017-11-17T12:41:57Z")

</div>

I am using an extension from a testing framework that is supposed to build up some indices and fill them with data on my elastic server.

The extension works perfectly well with a demo server that the company behind the extension gives us access to, containing just an elasticsearch instance.  
Although when we target our elasticsearch server we get the error of :  
application/x-www-form-urlencoded not supported.

That got me thinkng and used some more advanced queries though curl:  
The simple curl "[http://136.243.xx.xx:9200/](http://136.243.xx.xx:9200/) returns :  
{  
"name" : "Artorias",  
"cluster\_name" : "some name",  
"cluster\_uuid" : "some uid",  
"version" : {  
"number" : "6.0.0",  
"build\_hash" : "8f0685b",  
"build\_date" : "2017-11-10T18:41:22.859Z",  
"build\_snapshot" : false,  
"lucene\_version" : "7.0.1",  
"minimum\_wire\_compatibility\_version" : "5.6.0",  
"minimum\_index\_compatibility\_version" : "5.0.0"  
},  
"tagline" : "You Know, for Search"  
}

Then trying out a query like :  
curl "http:-XGET '[http://136.243.xx.xx:9200/\_cat/indices?v&pretty](http://136.243.xx.xx:9200/_cat/indices?v&pretty)'  
or  
curl "[http://136.243.xx.xx:9200/\_search](http://136.243.xx.xx:9200/_search)" -d '{"query": {"match\_all": {}}}'

return :

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

Could some http.cors directive help solve this?(i am still reading about this).

Hints to any direction? 🙂

---

<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:** [November 17, 2017, 12:44pm UTC](https://discuss.elastic.co/t/x-www-urlencoded-not-supported/108128/2 "2017-11-17T12:44:17Z")

</div>

[This blog post](https://www.elastic.co/blog/strict-content-type-checking-for-elasticsearch-rest-requests) covers the changes made to content type handling.

---

<div class="post-metadata">

**Author:** ![sancroth](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@sancroth](https://discuss.elastic.co/u/sancroth)\
**Post date:** [November 17, 2017, 12:46pm UTC](https://discuss.elastic.co/t/x-www-urlencoded-not-supported/108128/3 "2017-11-17T12:46:39Z")

</div>

You are great.

So if i understand correct they either got to change the way the extension sets it's headers to the correct type, or downgrade to 5.x and allow bad contet-type use to get through.Right? 😛

---

<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:** [December 15, 2017, 12:46pm UTC](https://discuss.elastic.co/t/x-www-urlencoded-not-supported/108128/4 "2017-12-15T12:46:41Z")

</div>

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