In case you are still looking for this information.
Take a look at the source code of the Responder. It does convert the provided text to byte array internally, so there is no way around it.
/// <summary>
/// Updates the data with which the web event responds and sets the correct MIME type.
/// </summary>
/// <param name="text">The plain/text to be published.</param>
public void Respond(string text)
{
if (CheckResponded()) return;
if (text != null)
{
webEvent.ContentType = "text/plain";
webEvent.ResponseData = Encoding.UTF8.GetBytes(text);
}
SendResponse();
}
So for non-included mime types you will need to use:
/// <summary>
/// Updates the data with which the WebEvent responds. The MIME type can be set manually.
/// </summary>
/// <param name="data">The data to be streamed. </param>
/// <param name="ContentType">The MIME type of the outgoing data.</param>
public void Respond(byte[] data, string ContentType)
{
if (CheckResponded()) return;
if (data != null)
{
webEvent.ContentType = ContentType;
webEvent.ResponseData = data;
}
SendResponse();
}