Stripping charset=utf-8 from Content-Type header

Is there a way to strip the charset=utf-8 from this header:

Content-Type: text/xml; charset=utf-8

I have a route that is being called by an external service and for some reason they can’t seem to process this header if charset=utf-8 is present.

You can disable it by clearing the content types they should be added to with:

SetConfig(new HostConfig {
    AppendUtf8CharsetOnContentTypes = new(),

This will become a global setting in this case no? Is there a way to do this only for certain requests?

public class MyServices : Service
    public string Get(MyRequest request) //for this request only
         //I tried base.Response.ContentType = "text/xml";


No, this configuration is what adds the suffix to the specified content types, removing them prevents them from being added.