I have an ApiController that serves XML/JSON, but I would like one of my actions to return pure HTML. I tried the below but it still return XML/JSON.
public string Get()
{
return "<strong>test</strong>";
}
This is what the above returns:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"><strong>test</strong></string>
Is there a way to return just the pure, unescaped text without even the surrounding XML tags (maybe a different return type of action attribute)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…