Returning alternative headers

TROHttpApiDispatcher can return data only in application/json; charset=utf-8 format.

You can create descendant of TROHttpApiDispatcher and override Process method:

procedure Process(
   aTransport: IROHTTPTransport; aRequest: IROHTTPRequest; 
   aResponse: IROHTTPResponse; aRequestData: TStream; aResponseData: TStream); override;

in this case, you can modify headers and response data if it is needed.

another possibility with similar functionality - to use HTTPServer.OnCustomResponseEvent as described in Using OnCustomResponseEvent in a ROSDK Server article.