# ES 5.6 elasticsearch\_deprecation.log WARN

**URL:** <https://discuss.elastic.co/t/es-5-6-elasticsearch-deprecation-log-warn/129675>\
**Category:** Elasticsearch\
**Created:** [April 26, 2018, 12:59pm UTC](https://discuss.elastic.co/t/es-5-6-elasticsearch-deprecation-log-warn/129675 "2018-04-26T12:59:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![clgs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clgs/32/48363_2.png) [@clgs](https://discuss.elastic.co/u/clgs)\
**Post date:** [April 26, 2018, 12:59pm UTC](https://discuss.elastic.co/t/es-5-6-elasticsearch-deprecation-log-warn/129675/1 "2018-04-26T12:59:37Z")

</div>

Hello.  
Tell me the probable cause of these records?

> [2018-04-26T15:40:08,206][WARN][o.e.d.r.RestController] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.  
> [2018-04-26T15:40:08,207][WARN][o.e.d.r.RestController] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.  
> [2018-04-26T15:40:08,208][WARN][o.e.d.r.RestController] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.  
> [2018-04-26T15:40:08,209][WARN][o.e.d.r.RestController] Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header.  
> ...

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 26, 2018, 4:42pm UTC](https://discuss.elastic.co/t/es-5-6-elasticsearch-deprecation-log-warn/129675/2 "2018-04-26T16:42:36Z")

</div>

You are calling elasticsearch with a body without specifying the `Content-Type`.

---

<div class="post-metadata">

**Author:** ![clgs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clgs/32/48363_2.png) [@clgs](https://discuss.elastic.co/u/clgs)\
**Post date:** [April 27, 2018, 9:39am UTC](https://discuss.elastic.co/t/es-5-6-elasticsearch-deprecation-log-warn/129675/3 "2018-04-27T09:39:19Z")

</div>

I specify so, but still there is a WARN

```auto
    <?php
    curl_setopt($ci, CURLOPT_URL, 'http://127.0.0.1:9200/index/type/');
    curl_setopt($ci, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ci, CURLOPT_FORBID_REUSE, 0);
    curl_setopt($ci, CURLOPT_HTTPHEADER, ['Content-Type: application/json; charset=UTF-8']);
    curl_setopt($ci, CURLOPT_POST, true);
    curl_setopt($ci, CURLOPT_POSTFIELDS, json_encode($data_query, JSON_UNESCAPED_UNICODE));
    ...
    ?>

```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 27, 2018, 9:54am UTC](https://discuss.elastic.co/t/es-5-6-elasticsearch-deprecation-log-warn/129675/4 "2018-04-27T09:54:16Z")

</div>

I don't know. What happens if you do that with `curl` instead of PHP?

---

<div class="post-metadata">

**Author:** ![clgs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clgs/32/48363_2.png) [@clgs](https://discuss.elastic.co/u/clgs)\
**Post date:** [April 27, 2018, 11:50am UTC](https://discuss.elastic.co/t/es-5-6-elasticsearch-deprecation-log-warn/129675/5 "2018-04-27T11:50:08Z")

</div>

The error went away. This was due to running scripts.  
Thank you. The problem is solved.

---

<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:** [May 25, 2018, 11:50am UTC](https://discuss.elastic.co/t/es-5-6-elasticsearch-deprecation-log-warn/129675/6 "2018-05-25T11:50:13Z")

</div>

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