WebApi中直接返回json字符串的方法
2017年09月27日 09:32
作者:独孤剑
阅读:123
[HttpPost]
public HttpResponseMessage Create()
{
string json = "{\"status\":\"success\"}";
return new HttpResponseMessage { Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json") };
}