Can't force a request to not default to a content type when I want it to be null
Author: dubbled-piqCreated Sep 3, 2020Updated Mar 23, 2026
I have a use case where we have customers that send in requests without content-type or with the value of that header not set. I am using rest assured to test a fix where my app defaults it to `application/json` if it is not present. To test that I need to ensure that this header is not set. When I do that rest assured will default the content-type to `text/plain`. Can't find a way to disable this behavior. Am I missing something? Would be a cool feature to serialize/marshall the request without content-type. It has a use case.
Source: rest-assured/rest-assured