[HttpPost] public HttpResponseMessage Upload() { string json = "{\"result\":\"true\"}"; return new HttpResponseMessage { Content = new StringContent(json, System.Text.Encoding.UTF8, "application/json") }; }
WebApi中直接返回json字符串的方法
时间: 2024-10-10 07:43:24