I am expecting "Hello World" as output the way it provides in Web API 2.
Instead it gives following output:
{"Version":{"Major":1,"Minor":1,"Build":-1,"Revision":-1,"MajorRevision":-1,"MinorRevision":-1},"Content":{"Headers":[{"Key":"Content-Type","Value":["text/html"]}]},"StatusCode":200,"ReasonPhrase":"OK","Headers":[],"RequestMessage":null,"IsSuccessStatusCode":true}
[HttpGet]
public HttpResponseMessage Get()
{
var response = new HttpResponseMessage {
Content = new StringContent("<html><body>Hello World</body></html>")
};
response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html"); return response;
}