这是我的控制器,我正在发送我的HTML
public class MyModuleController : Controller
{
// GET: api/values
[HttpGet]
public HttpResponseMessage Get()
{
var response = new HttpResponseMessage();
response.Content = new StringContent("<html><body>Hello World</body></html>");
response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html");
return response;
}
}
我收到了这个响应
{"version":{"major":1,"minor":1,"build":-1,"revision":-1,
"majorRevision":-1,"minorRevision":-1},"content":{"headers":[{"key":"Content-Type","value":["text/plain;
charset=utf-8"]}]},"statusCode":200,"reasonPhrase":"OK","headers":[],"requestMessage":null,"isSuccessStatusCode":true}
我只想要输出我的HTML。请问有谁可以帮忙吗?谢谢。