Http.content_type.required: false by default then why asking for content type


(Dilip Kumar) #1

Hi All,
If http.content_type.required: false by default then why in log file saying "Content type detection for rest requests is deprecated."


(Jason Tedor) #2

Because in 6.0.0, http.content_type.required will no longer be configurable and will act as if it defaults to true. This means that HTTP requests with a body will require the Content-Type header to be set.


(Dilip Kumar) #3

Thank you jasontedor, but why i am getting warning in log file even i have added content type . Please send me one example..


(Jason Tedor) #4

I think you must have a request where you not sending the Content-Type otherwise you would not see this log message.


(Dilip Kumar) #5

Thank you reply , i have added content type but still getting message content type should be add.

please share curl example with content type...


(Jason Tedor) #6

Please provide a reproduction.

You just add the header:

curl -H "Content-Type: application/json" ...

(system) #7

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