来自:http://www.cnblogs.com/David-Huang/p/4351023.html

返回字符串,突然碰到双引号号问题,幸亏有人解决了。

 

返回XMLDocument类型,默认会解析为json格式。返回字符串会默认加双引号。

  解决方法:返回HttpResponseMessage类型,自定义返回值类型。

  

HttpResponseMessage responseMessage =
                new HttpResponseMessage { Content = new StringContent(result, Encoding.GetEncoding("UTF-8"), "text/plain") };

相关文章:

  • 2021-12-16
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-01
  • 2022-02-28
  • 2021-11-13
猜你喜欢
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
相关资源
相似解决方案